- Add a --debug=pdb option to re-run SCons under the Python debugger.
+ - Only compute a build signature once for each node.
+
From Steve Leblanc:
- Add var=value command-line arguments.
else:
return 0
- def set_bsig(self, bsig):
- """Set the build signature for this file, updating the
- .sconsign entry."""
- Entry.set_bsig(self, bsig)
- self.set_sconsign()
-
- def set_csig(self, csig):
- """Set the content signature for this file, updating the
- .sconsign entry."""
- Entry.set_csig(self, csig)
- self.set_sconsign()
-
- def set_sconsign(self):
+ def store_sigs(self):
"""Update a file's .sconsign entry with its current info."""
self.dir.sconsign().set(self.name, self.get_timestamp(),
self.get_bsig(), self.get_csig())
node.set_csig('zzz')
assert node.get_csig() == 'zzz'
+ def test_store_sigs(self):
+ """Test calling the method to store signatures
+ """
+ node = SCons.Node.Node()
+ node.store_sigs()
+
def test_set_precious(self):
"""Test setting a Node's precious value
"""
"""Set the signature of the node's content."""
self.csig = csig
+ def store_sigs(self):
+ """Make the signatures permanent (that is, store them in the
+ .sconsign file or equivalent)."""
+ pass
+
def set_precious(self, precious = 1):
"""Set the Node's precious value."""
self.precious = precious
def __init__(self, tm, targets, top):
self.tm = tm
self.targets = targets
- self.bsig = {}
self.top = top
def execute(self):
- if not self.targets[0].get_state() == SCons.Node.up_to_date:
+ if self.targets[0].get_state() != SCons.Node.up_to_date:
self.targets[0].build()
def get_target(self):
"""
return self.targets[0]
- def set_bsig(self, target, bsig):
- """Set the task's (*not* the target's) build signature
- for this target.
-
- This will be used later to update the target's actual
- build signature *if* the build succeeds."""
- self.bsig[target] = bsig
-
def set_tstates(self, state):
"""Set all of the target nodes's states."""
for t in self.targets:
if self.targets[0].get_state() == SCons.Node.executing:
self.set_tstates(SCons.Node.executed)
for t in self.targets:
- t.set_bsig(self.bsig[t])
+ t.store_sigs()
parents = {}
for p in reduce(lambda x, y: x + y.get_parents(), self.targets, []):
parents[p] = 1
state = SCons.Node.up_to_date
for t in self.targets:
bsig = self.tm.calc.bsig(t)
- self.set_bsig(t, bsig)
+ t.set_bsig(bsig)
if not self.tm.calc.current(t, bsig):
state = SCons.Node.executing
self.set_tstates(state)
def set_csig(self, csig):
self.csig = csig
+
+ def store_sigs(self):
+ pass
def children_are_executed(self):
return reduce(lambda x,y: ((y.get_state() == SCons.Node.executed