summaryrefslogtreecommitdiffstats
path: root/test/overrides.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-02-24 06:19:49 (GMT)
committerSteven Knight <knight@baldmt.com>2004-02-24 06:19:49 (GMT)
commit4b3d35e6964da9108f1d55a8d0dbb2161300bd3f (patch)
tree21ab8d3cc408214f1e550bf4df7a27c3b45115fe /test/overrides.py
parentd8b17914c7e3983c6c68c7aea2f0a835f00ddb07 (diff)
downloadSCons-4b3d35e6964da9108f1d55a8d0dbb2161300bd3f.zip
SCons-4b3d35e6964da9108f1d55a8d0dbb2161300bd3f.tar.gz
SCons-4b3d35e6964da9108f1d55a8d0dbb2161300bd3f.tar.bz2
Handle recursive substitution in overrides.
Diffstat (limited to 'test/overrides.py')
-rw-r--r--test/overrides.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/overrides.py b/test/overrides.py
index d9b6fde..a247f7d 100644
--- a/test/overrides.py
+++ b/test/overrides.py
@@ -34,14 +34,18 @@ test = TestSCons.TestSCons()
python = TestSCons.python
test.write('SConstruct', """
-env = Environment(LIBS=['a'])
+env = Environment(CCFLAGS='-DFOO', LIBS=['a'])
def build(target, source, env):
print "env['CC'] =", env['CC']
+ print "env['CCFLAGS'] =", env['CCFLAGS']
print "env['LIBS'] =", env['LIBS']
builder = Builder(action=build, CC='buildcc', LIBS='buildlibs')
env['BUILDERS']['Build'] = builder
-foo = env.Build('foo.out', 'foo.in', CC='mycc', LIBS = env['LIBS']+['b'])
+foo = env.Build('foo.out', 'foo.in',
+ CC='mycc',
+ CCFLAGS='$CCFLAGS -DBAR',
+ LIBS = env['LIBS']+['b'])
bar = env.Build('bar.out', 'bar.in')
Default([foo, bar])
""")
@@ -52,9 +56,11 @@ test.write('bar.in', "bar.in\n")
test.run(arguments = "-Q", stdout = """\
build("foo.out", "foo.in")
env['CC'] = mycc
+env['CCFLAGS'] = -DFOO -DBAR
env['LIBS'] = ['a', 'b']
build("bar.out", "bar.in")
env['CC'] = buildcc
+env['CCFLAGS'] = -DFOO
env['LIBS'] = buildlibs
""")