- Add a deprecated warning for use of the old "scanner" keyword argument
to Builder creation.
+ - Improve the --debug=explain message when the build action changes.
+
From Christoph Wiedemann:
- Add an Environment.SetDefault() method that only sets values if
if len(lines) == 0:
newact, newactsig = self.binfo.bact, self.binfo.bactsig
+ def fmt_with_title(title, strlines):
+ lines = string.split(strlines, '\n')
+ sep = '\n' + ' '*(15 + len(title))
+ return ' '*15 + title + string.join(lines, sep) + '\n'
if old.bactsig != newactsig:
if old.bact == newact:
- lines.append("the contents of the build action changed\n")
+ lines.append("the contents of the build action changed\n" +
+ fmt_with_title('action: ', newact))
else:
lines.append("the build action changed:\n" +
- "%sold: %s\n" % (' '*15, old.bact) +
- "%snew: %s\n" % (' '*15, newact))
+ fmt_with_title('old: ', old.bact) +
+ fmt_with_title('new: ', newact))
if len(lines) == 0:
return "rebuilding `%s' for unknown reasons" % self
tgt = str(target[0])
src = str(source[0])
shutil.copy(src, tgt)
- MyCopy = Builder(action = DifferentCopy)
+ def AltCopyStage2(target, source, env):
+ pass
+ MyCopy = Builder(action = [DifferentCopy, AltCopyStage2])
def ChangingCopy(target, source, env):
tgt = str(target[0])
scons: rebuilding `f1.out' because the build action changed:
old: Copy("f1.out", "f1.in")
new: DifferentCopy(["f1.out"], ["f1.in"])
+ AltCopyStage2(["f1.out"], ["f1.in"])
DifferentCopy(["f1.out"], ["f1.in"])
+AltCopyStage2(["f1.out"], ["f1.in"])
scons: rebuilding `f2.out' because the contents of the build action changed
+ action: ChangingCopy(["f2.out"], ["f2.in"])
ChangingCopy(["f2.out"], ["f2.in"])
"""))