From 2a2fec923cddc1acce280feeceb951d993dd32eb Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Tue, 20 Jul 2004 23:39:47 +0000 Subject: [PATCH] (subdirs)[GO_FAST_BUTTON]: Try to read all subdirs only when necessary. --- ChangeLog | 4 +++- SConstruct | 19 +++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d3f310e3f5..5380b84289 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,11 @@ 2004-07-21 Jan Nieuwenhuizen - * SConstruct: GO_FAST_BUTTON: implement tips from Andreas Roach. + * SConstruct[GO_FAST_BUTTON]: implement tips from Andreas Roach. This brings SCons run-time on up-to-date tree down from 48s with only checksums, to 34s without 2day checksums, to 14s (make needs 4 seconds). + (subdirs)[GO_FAST_BUTTON]: Try to read all subdirs only when + necessary. 2004-07-20 Han-Wen Nienhuys diff --git a/SConstruct b/SConstruct index e8df51cf5e..daa7560ee1 100644 --- a/SConstruct +++ b/SConstruct @@ -86,7 +86,7 @@ usage = r'''Usage: scons [KEY=VALUE].. [TARGET|DIR].. TARGETS: clean, config, doc, dist, install, mf-essential, po-update, - realclean, release, tar, TAGS + realclean, release, sconsclean, tar, TAGS ''' @@ -561,6 +561,13 @@ if 'clean' in COMMAND_LINE_TARGETS: os.unlink (config_cache) Exit (s) +if 'sconsclean' in COMMAND_LINE_TARGETS: + command = 'rm -rf scons.cache $(find . -name ".scon*")' + s = os.system (command) + if os.path.exists (config_cache): + os.unlink (config_cache) + Exit (s) + if 'realclean' in COMMAND_LINE_TARGETS: command = 'rm -rf $(find . -name "out-scons" -o -name ".scon*")' sys.stdout.write ('Running %s ... ' % command) @@ -717,7 +724,15 @@ def flatten (tree, lst): lst.append (i) return lst -subdirs = flatten (cvs_dirs ('.'), []) +if GO_FAST_BUTTON\ + and 'all' not in COMMAND_LINE_TARGETS\ + and 'doc' not in COMMAND_LINE_TARGETS\ + and 'web' not in COMMAND_LINE_TARGETS\ + and 'install' not in COMMAND_LINE_TARGETS\ + and 'clean' not in COMMAND_LINE_TARGETS: + subdirs = ['lily','flower', 'mf'] +else: + subdirs = flatten (cvs_dirs ('.'), []) readme_files = ['AUTHORS', 'README', 'INSTALL', 'NEWS'] foo = map (lambda x: env.TXT (x + '.txt', os.path.join ('Documentation/topdocs', x)), -- 2.39.5