From: stevenknight Date: Sun, 30 Dec 2001 00:21:33 +0000 (+0000) Subject: Fix race condition with --debug=tree and -j X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b56b2f19bd1a51f4e2f68affbbd2303d69840d27;p=scons.git Fix race condition with --debug=tree and -j git-svn-id: http://scons.tigris.org/svn/scons/trunk@180 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/engine/SCons/Script/__init__.py b/src/engine/SCons/Script/__init__.py index 3b5a79d1..9b5430fa 100644 --- a/src/engine/SCons/Script/__init__.py +++ b/src/engine/SCons/Script/__init__.py @@ -71,19 +71,22 @@ class BuildTask(SCons.Taskmaster.Task): if self.target.get_state() == SCons.Node.up_to_date: if self.top: print 'scons: "%s" is up to date.' % str(self.target) - if print_tree: - print - print SCons.Util.render_tree(self.target, get_children) else: try: self.target.build() - if self.top and print_tree: - print - print SCons.Util.render_tree(self.target, get_children) except BuildError, e: sys.stderr.write("scons: *** [%s] Error %s\n" % (e.node, str(e.stat))) raise + def executed(self): + SCons.Taskmaster.Task.executed(self) + # print the tree here instead of in execute() because + # this method is serialized, but execute isn't: + if print_tree and self.top: + print + print SCons.Util.render_tree(self.target, get_children) + + def failed(self): global ignore_errors if ignore_errors: