diff options
author | Steven Knight <knight@baldmt.com> | 2003-03-22 08:31:26 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-03-22 08:31:26 (GMT) |
commit | 3be8585d1be52d25020b93d99c333d9c9d577b51 (patch) | |
tree | 1841b7b005e680ba16d9a897e759774390a1583c /src/engine/SCons/Taskmaster.py | |
parent | 5ea9b7416ae70c3a4678bcf337bebd41b944cf86 (diff) | |
download | SCons-3be8585d1be52d25020b93d99c333d9c9d577b51.zip SCons-3be8585d1be52d25020b93d99c333d9c9d577b51.tar.gz SCons-3be8585d1be52d25020b93d99c333d9c9d577b51.tar.bz2 |
Make RCS/SCCS/BitKeeper support more transparent.
Diffstat (limited to 'src/engine/SCons/Taskmaster.py')
-rw-r--r-- | src/engine/SCons/Taskmaster.py | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/engine/SCons/Taskmaster.py b/src/engine/SCons/Taskmaster.py index 2ab076b..93df569 100644 --- a/src/engine/SCons/Taskmaster.py +++ b/src/engine/SCons/Taskmaster.py @@ -63,6 +63,12 @@ class Task: This unlinks all targets and makes all directories before building anything.""" + + # Now that it's the appropriate time, give the TaskMaster a + # chance to raise any exceptions it encountered while preparing + # this task. + self.tm.exception_raise() + if self.targets[0].get_state() != SCons.Node.up_to_date: for t in self.targets: t.prepare() @@ -74,11 +80,6 @@ class Task: so only do thread safe stuff here. Do thread unsafe stuff in prepare(), executed() or failed().""" - # Now that it's the appropriate time, give the TaskMaster a - # chance to raise any exceptions it encountered while preparing - # this task. - self.tm.exception_raise() - try: self.targets[0].build() except KeyboardInterrupt: @@ -245,8 +246,18 @@ class Taskmaster: # Add derived files that have not been built # to the candidates list: def derived(node): - return (node.has_builder() or node.side_effect) and node.get_state() == None - derived = filter(derived, children) + return node.is_derived() and node.get_state() == None + try: + derived = filter(derived, children) + except: + # We had a problem just trying to figure out the + # children (like a child couldn't be linked in to a + # BuildDir, or a Scanner threw something). Arrange to + # raise the exception when the Task is "executed." + self.exception_set(sys.exc_type, sys.exc_value) + self.candidates.pop() + self.ready = node + break if derived: derived.reverse() self.candidates.extend(self.order(derived)) |