summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2001-09-21 21:04:14 (GMT)
committerSteven Knight <knight@baldmt.com>2001-09-21 21:04:14 (GMT)
commit21a368c1a8d22330a27381978984f1c7a33f4db6 (patch)
tree9c4d43b6b5c60aa4c4bb6851515a9f72cac789f4 /src/script
parentf407037c97df685b54882142784d2f353aaac6b6 (diff)
downloadSCons-21a368c1a8d22330a27381978984f1c7a33f4db6.zip
SCons-21a368c1a8d22330a27381978984f1c7a33f4db6.tar.gz
SCons-21a368c1a8d22330a27381978984f1c7a33f4db6.tar.bz2
Have SCons report when something is up-to-date.
Diffstat (limited to 'src/script')
-rw-r--r--src/script/scons.py27
1 files changed, 25 insertions, 2 deletions
diff --git a/src/script/scons.py b/src/script/scons.py
index a6a7f81..3b1a533 100644
--- a/src/script/scons.py
+++ b/src/script/scons.py
@@ -547,9 +547,32 @@ def main():
if not targets:
targets = default_targets
+ # XXX Right now, this next block prints all "up to date" messages
+ # first, and then goes through and builds the other nodes:
+ #
+ # $ scons aaa bbb ccc ddd
+ # scons: "aaa" is up to date.
+ # scons: "ccc" is up to date.
+ # cc -o bbb bbb.c
+ # cc -o ddd ddd.c
+ #
+ # When we get the real Task and Taskmaster classes, this should
+ # be changed to interact with the engine to deal with targets in
+ # the same order as specified:
+ #
+ # $ scons aaa bbb ccc ddd
+ # scons: "aaa" is up to date.
+ # cc -o bbb bbb.c
+ # scons: "ccc" is up to date.
+ # cc -o ddd ddd.c
+ #
calc = SCons.Sig.Calculator(SCons.Sig.MD5)
- nodes = map(lambda x: SCons.Node.FS.default_fs.File(x), targets)
- nodes = filter(lambda x, calc=calc: not calc.current(x), nodes)
+ nodes = []
+ for t in map(lambda x: SCons.Node.FS.default_fs.File(x), targets):
+ if calc.current(t):
+ print 'scons: "%s" is up to date.' % t.path
+ else:
+ nodes.append(t)
taskmaster = Taskmaster(nodes)