diff options
author | Steven Knight <knight@baldmt.com> | 2001-10-24 14:18:02 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2001-10-24 14:18:02 (GMT) |
commit | 6a98a941a75eab2e4c22fa3e19cb973046f613b6 (patch) | |
tree | fbedd2a2caa8c7d0e4a1e4b774adc6e1b1ed6d8e /src/script | |
parent | 908b74a3a3ecba5eccc6fd1f844505050d9dad2f (diff) | |
download | SCons-6a98a941a75eab2e4c22fa3e19cb973046f613b6.zip SCons-6a98a941a75eab2e4c22fa3e19cb973046f613b6.tar.gz SCons-6a98a941a75eab2e4c22fa3e19cb973046f613b6.tar.bz2 |
Add -k support and more
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/scons.py | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/script/scons.py b/src/script/scons.py index 18347b4..84d7f78 100644 --- a/src/script/scons.py +++ b/src/script/scons.py @@ -89,15 +89,8 @@ class ScriptTaskmaster(SCons.Taskmaster.Taskmaster): if top: print 'scons: "%s" is up to date.' % node SCons.Taskmaster.Taskmaster.up_to_date(self, node) - - def failed(self, task): - if self.ignore_errors: - SCons.Taskmaster.Taskmaster.executed(self, task) - else: - SCons.Taskmaster.Taskmaster.failed(self, task) - ignore_errors = 0 - + # Global variables default_targets = [] @@ -107,6 +100,8 @@ num_jobs = 1 scripts = [] task_class = BuildTask # default action is to build targets current_func = None +ignore_errors = 0 +keep_going_on_error = 0 # utility functions @@ -382,7 +377,8 @@ def options_init(): help = "Print this message and exit.") def opt_i(opt, arg): - ScriptTaskmaster.ignore_errors = 1 + global ignore_errors + ignore_errors = 1 Option(func = opt_i, short = 'i', long = ['ignore-errors'], @@ -412,7 +408,11 @@ def options_init(): short = 'j', long = ['jobs'], arg = 'N', help = "Allow N jobs at once.") - Option(func = opt_not_yet, + def opt_k(opt, arg): + global keep_going_on_error + keep_going_on_error = 1 + + Option(func = opt_k, short = 'k', long = ['keep-going'], help = "Keep going when a target can't be made.") @@ -636,7 +636,11 @@ def main(): if not current_func: current_func = calc.current - taskmaster = ScriptTaskmaster(nodes, task_class, current_func) + taskmaster = ScriptTaskmaster(nodes, + task_class, + current_func, + ignore_errors, + keep_going_on_error) jobs = SCons.Job.Jobs(num_jobs, taskmaster) jobs.start() |