diff options
author | Steven Knight <knight@baldmt.com> | 2004-09-29 12:06:20 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-09-29 12:06:20 (GMT) |
commit | f61f1a0edd77144aac413157a5f6a201829cce78 (patch) | |
tree | dfd24576a3e8d10afbf63de3df9caabac0d9ce2f | |
parent | 941625a947cdc5af941011271485170874f2cba5 (diff) | |
download | SCons-f61f1a0edd77144aac413157a5f6a201829cce78.zip SCons-f61f1a0edd77144aac413157a5f6a201829cce78.tar.gz SCons-f61f1a0edd77144aac413157a5f6a201829cce78.tar.bz2 |
Fix use of a list of SConscript files when calling env.SConscript().
-rw-r--r-- | src/CHANGES.txt | 3 | ||||
-rw-r--r-- | src/engine/SCons/Script/SConscript.py | 8 | ||||
-rw-r--r-- | test/SConscript.py | 7 |
3 files changed, 17 insertions, 1 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 15be7db..d538b12 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -82,6 +82,9 @@ RELEASE 0.97 - XXX - On Win32, install scons.bat in the Python directory when installing from setup.py. (The bdist_wininst installer was already doing this.) + - Fix env.SConscript() when called with a list of SConscipt files. + (The SConscript() global function already worked properly.) + From Clive Levinson: - Make ParseConfig() recognize and add -mno-cygwin to $LINKFLAGS and diff --git a/src/engine/SCons/Script/SConscript.py b/src/engine/SCons/Script/SConscript.py index 88d3268..6adb399 100644 --- a/src/engine/SCons/Script/SConscript.py +++ b/src/engine/SCons/Script/SConscript.py @@ -495,7 +495,13 @@ class SConsEnvironment(SCons.Environment.Base): raise SCons.Errors.UserError, "Import of non-existent variable '%s'"%x def SConscript(self, *ls, **kw): - ls = map(lambda l, self=self: self.subst(l), ls) + def subst_element(x, subst=self.subst): + if SCons.Util.is_List(x): + x = map(subst, x) + else: + x = subst(x) + return x + ls = map(subst_element, ls) subst_kw = {} for key, val in kw.items(): if SCons.Util.is_String(val): diff --git a/test/SConscript.py b/test/SConscript.py index e70fb36..4aaed3b 100644 --- a/test/SConscript.py +++ b/test/SConscript.py @@ -374,6 +374,8 @@ y = 'yyy' env.Export(["x", "y"]) env.SConscript('$SUB1/SConscript') env.SConscript(dirs=['$SUB2']) +SConscript(['s1', 's2']) +env.SConscript(['s3', 's4']) """) test.write(['sub1', 'SConscript'], """\ @@ -390,6 +392,11 @@ print "sub2/SConscript" print "y =", y """) +test.write('s1', "\n") +test.write('s2', "\n") +test.write('s3', "\n") +test.write('s4', "\n") + expect = """\ SConstruct sub1/SConscript |