diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/CHANGES.txt | 2 | ||||
-rw-r--r-- | src/engine/SCons/Script.py | 17 |
2 files changed, 15 insertions, 4 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 23a7da7..953c9e6 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -23,6 +23,8 @@ RELEASE 0.02 - - Fixed SCONS_LIB_DIR to work as documented (courtesy Anthony Roach). + - Made Default() accept Nodes as arguments (courtesy Anthony Roach). + RELEASE 0.01 - Thu Dec 13 19:25:23 CST 2001 diff --git a/src/engine/SCons/Script.py b/src/engine/SCons/Script.py index 086e470..15abb48 100644 --- a/src/engine/SCons/Script.py +++ b/src/engine/SCons/Script.py @@ -166,8 +166,11 @@ def SConscript(sconscript, export={}): def Default(*targets): for t in targets: - for s in string.split(t): - default_targets.append(s) + if isinstance(t, SCons.Node.Node): + default_targets.append(t) + else: + for s in string.split(t): + default_targets.append(s) def Help(text): global help_option @@ -648,8 +651,14 @@ def _main(): if not targets: targets = default_targets - - nodes = map(lambda x: SCons.Node.FS.default_fs.Entry(x), targets) + + def Entry(x): + if isinstance(x, SCons.Node.Node): + return x + else: + return SCons.Node.FS.default_fs.Entry(x) + + nodes = map(Entry, targets) if not calc: calc = SCons.Sig.Calculator(SCons.Sig.MD5) |