diff options
author | Steven Knight <knight@baldmt.com> | 2001-12-17 05:36:08 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2001-12-17 05:36:08 (GMT) |
commit | 2c6e8c67b164bd354d5f34c4b260ef0ca6c6c473 (patch) | |
tree | c30ce7708b16e20a505bb00d966002f9f3a58e36 /src/engine/SCons/Script.py | |
parent | afe9f16b5aeb7fc9861c354a58b05d3f2119b46b (diff) | |
download | SCons-2c6e8c67b164bd354d5f34c4b260ef0ca6c6c473.zip SCons-2c6e8c67b164bd354d5f34c4b260ef0ca6c6c473.tar.gz SCons-2c6e8c67b164bd354d5f34c4b260ef0ca6c6c473.tar.bz2 |
Make Default() accept a node
Diffstat (limited to 'src/engine/SCons/Script.py')
-rw-r--r-- | src/engine/SCons/Script.py | 17 |
1 files changed, 13 insertions, 4 deletions
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) |