summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-09-20 12:51:39 (GMT)
committerSteven Knight <knight@baldmt.com>2001-09-20 12:51:39 (GMT)
commite02616efd0158ecd07b6f6cdea564e7aa648ab99 (patch)
tree5fdbdd9e3f3b72b2d0002f743ae951bade5252f7 /src/script
parent2e862e98a5109da56222d7ba7bcc52c5d718ea82 (diff)
downloadSCons-e02616efd0158ecd07b6f6cdea564e7aa648ab99.zip
SCons-e02616efd0158ecd07b6f6cdea564e7aa648ab99.tar.gz
SCons-e02616efd0158ecd07b6f6cdea564e7aa648ab99.tar.bz2
Add support for Default() targets.
Diffstat (limited to 'src/script')
-rw-r--r--src/script/scons.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/script/scons.py b/src/script/scons.py
index 8736787..9dc41e6 100644
--- a/src/script/scons.py
+++ b/src/script/scons.py
@@ -61,6 +61,7 @@ class Taskmaster:
# Global variables
+default_targets = []
local_help = None
num_jobs = 1
Scripts = []
@@ -104,6 +105,11 @@ def Conscript(filename):
global Scripts
Scripts.append(filename)
+def Default(*targets):
+ for t in targets:
+ for s in string.split(t):
+ default_targets.append(s)
+
def Help(text):
global local_help
if local_help:
@@ -534,6 +540,9 @@ def main():
PrintUsage()
sys.exit(0)
+ if not targets:
+ targets = default_targets
+
taskmaster = Taskmaster(map(
lambda x: SCons.Node.FS.default_fs.File(x),
targets))