1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# SPDX-License-Identifier: MIT
#
# Copyright The SCons Foundation
#
# Testcase to check that .relpath works on SOURCES,TARGETS, and the singular SOURCE
# This is the SConstruct for test/File/File-relpath.py
DefaultEnvironment(tools=[])
env = Environment(tools=[])
input_list = [
"${TARGETS.relpath}",
"${TARGETS.abspath}",
"${SOURCES.relpath}",
"${SOURCES.abspath}",
"${SOURCE.relpath}",
"${SOURCE.abspath}",
]
outputs = env.subst(
input_list,
target=[File("../foo/dir"), File("build/file1")],
source=[File("src/file")],
)
for i, s in zip(input_list, outputs):
print("%s=%s" % (i, s))
|