summaryrefslogtreecommitdiffstats
path: root/test/File/fixture/relpath/base/SConstruct
blob: 4bb50782c9b550d7b903aeb4beb79dab93ac84a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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))