summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-09-18 18:30:35 (GMT)
committerSteven Knight <knight@baldmt.com>2004-09-18 18:30:35 (GMT)
commit0d70cbb58a33aeca99b6e0b4d2f11c93a92dd670 (patch)
tree0f9c43b8b55625dca1c3d9c27459af1fc2a97f5f /src/engine
parent2ecff9e4a918f9af6e8271ebc51099c6c5357f3f (diff)
downloadSCons-0d70cbb58a33aeca99b6e0b4d2f11c93a92dd670.zip
SCons-0d70cbb58a33aeca99b6e0b4d2f11c93a92dd670.tar.gz
SCons-0d70cbb58a33aeca99b6e0b4d2f11c93a92dd670.tar.bz2
Build targets in an associated BuildDir even if there are local targets in the source directory. (Kevin Quick)
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/SCons/Taskmaster.py11
-rw-r--r--src/engine/SCons/TaskmasterTests.py3
2 files changed, 9 insertions, 5 deletions
diff --git a/src/engine/SCons/Taskmaster.py b/src/engine/SCons/Taskmaster.py
index 84eb08d..6bd5e21 100644
--- a/src/engine/SCons/Taskmaster.py
+++ b/src/engine/SCons/Taskmaster.py
@@ -253,6 +253,7 @@ class Taskmaster:
self.ready = None # the next task that is ready to be executed
self.order = order
self.message = None
+ self.altered = []
def _find_next_ready_node(self):
"""Find the next node that is ready to be built"""
@@ -331,15 +332,15 @@ class Taskmaster:
self.ready = node
break
- # If there aren't any children with builders and this
- # was a top-level argument, then see if we can find any
+ # If this was a top-level argument and we haven't already
+ # done so, see if we can alter the target list to find any
# corresponding targets in linked build directories:
- if not derived and node in self.targets:
+ if node in self.targets and node not in self.altered:
alt, message = node.alter_targets()
if alt:
self.message = message
- self.candidates.pop()
- self.candidates.extend(alt)
+ self.candidates.extend(self.order(alt))
+ self.altered.append(node)
continue
# Add derived files that have not been built
diff --git a/src/engine/SCons/TaskmasterTests.py b/src/engine/SCons/TaskmasterTests.py
index a908192..cc4ba0c 100644
--- a/src/engine/SCons/TaskmasterTests.py
+++ b/src/engine/SCons/TaskmasterTests.py
@@ -421,6 +421,9 @@ class TaskmasterTestCase(unittest.TestCase):
t = tm.next_task()
assert t.get_target() == n7
t.executed()
+ t = tm.next_task()
+ assert t.get_target() == n6
+ t.executed()
n1 = Node("n1")
n2 = Node("n2", [n1])