diff options
author | Gary Oberbrunner <garyo@oberbrunner.com> | 2011-03-01 00:48:34 (GMT) |
---|---|---|
committer | Gary Oberbrunner <garyo@oberbrunner.com> | 2011-03-01 00:48:34 (GMT) |
commit | f6027721b125af34862d1ba7ca5ba2205a09e1fe (patch) | |
tree | 42c19eb88c9178695c1c3a268b61140ea40ab637 /src | |
parent | 925ece49f121303e558f9d63b1c138f814465fc8 (diff) | |
download | SCons-f6027721b125af34862d1ba7ca5ba2205a09e1fe.zip SCons-f6027721b125af34862d1ba7ca5ba2205a09e1fe.tar.gz SCons-f6027721b125af34862d1ba7ca5ba2205a09e1fe.tar.bz2 |
New debug option --debug=prepare to watch targets being prepared
Diffstat (limited to 'src')
-rw-r--r-- | src/CHANGES.txt | 4 | ||||
-rw-r--r-- | src/RELEASE.txt | 5 | ||||
-rw-r--r-- | src/engine/SCons/Script/Main.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Script/SConsOptions.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Taskmaster.py | 8 |
5 files changed, 19 insertions, 2 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index f49c9af..31fa245 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -10,6 +10,10 @@ RELEASE 2.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE From Gary Oberbrunner: - Adding None to an Action no longer fails (just returns original action) + From Gary Oberbrunner: + - New --debug=prepare option to show each target as it's being + prepared, whether or not anything needs to be done for it. + From David Garcia Garzon: - Fix Delete to be able to delete broken symlinks and dir symlinks. diff --git a/src/RELEASE.txt b/src/RELEASE.txt index 4c0017f..f9d550e 100644 --- a/src/RELEASE.txt +++ b/src/RELEASE.txt @@ -49,7 +49,7 @@ - List modifications to existing features, where the previous behavior wouldn't actually be considered a bug - - Add initial support for VS/VC 2001 + - Add initial support for VS/VC 2010 FIXES @@ -82,6 +82,9 @@ - TeX command strings now work on Windows when the new dir is on a different drive letter. - DMD version 2 is supported (using the phobos2 library) + - New --debug=prepare option shows each target as it's prepared + for building; can help when you don't know why a target isn't + being built. - List improvements that wouldn't be visible to the user in the documentation: performance improvements (describe the circumstances diff --git a/src/engine/SCons/Script/Main.py b/src/engine/SCons/Script/Main.py index e0600bd..0513e41 100644 --- a/src/engine/SCons/Script/Main.py +++ b/src/engine/SCons/Script/Main.py @@ -654,6 +654,8 @@ def _set_debug_values(options): print_time = 1 if "tree" in debug_values: options.tree_printers.append(TreePrinter()) + if "prepare" in debug_values: + SCons.Taskmaster.print_prepare = 1 def _create_path(plist): path = '.' diff --git a/src/engine/SCons/Script/SConsOptions.py b/src/engine/SCons/Script/SConsOptions.py index ceb6006..fc5f08d 100644 --- a/src/engine/SCons/Script/SConsOptions.py +++ b/src/engine/SCons/Script/SConsOptions.py @@ -598,7 +598,7 @@ def Parser(version): debug_options = ["count", "explain", "findlibs", "includes", "memoizer", "memory", "objects", - "pdb", "presub", "stacktrace", + "pdb", "prepare", "presub", "stacktrace", "time"] + list(deprecated_debug_options.keys()) def opt_debug(option, opt, value, parser, diff --git a/src/engine/SCons/Taskmaster.py b/src/engine/SCons/Taskmaster.py index 8cf5595..58a8d90 100644 --- a/src/engine/SCons/Taskmaster.py +++ b/src/engine/SCons/Taskmaster.py @@ -66,6 +66,7 @@ NODE_UP_TO_DATE = SCons.Node.up_to_date NODE_EXECUTED = SCons.Node.executed NODE_FAILED = SCons.Node.failed +print_prepare = 0 # set by option --debug=prepare # A subsystem for recording stats about how different Nodes are handled by # the main Taskmaster loop. There's no external control here (no need for @@ -161,6 +162,7 @@ class Task(object): unlink underlying files and make all necessary directories before the Action is actually called to build the targets. """ + global print_prepare T = self.tm.trace if T: T.write(self.trace_message(u'Task.prepare()', self.node)) @@ -186,8 +188,14 @@ class Task(object): executor = self.targets[0].get_executor() executor.prepare() for t in executor.get_action_targets(): + if print_prepare: + print "Preparing target %s..."%t + for s in t.side_effects: + print "...with side-effect %s..."%s t.prepare() for s in t.side_effects: + if print_prepare: + print "...Preparing side-effect %s..."%s s.prepare() def get_target(self): |