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).
+2004-07-21 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * 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).
+
2004-07-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
* lily/slur-quanting.cc (score_extra_encompass): add break ;
2004-07-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
* lily/slur-quanting.cc (score_extra_encompass): add break ;
TOPLEVEL_VERSION = version,
)
TOPLEVEL_VERSION = version,
)
+# Hardcoded usability switch (Anthony Roach).
+# See http://www.scons.org/cgi-bin/wiki/GoFastButton
+# First do: scons realclean .
+GO_FAST_BUTTON = 1
+
# Add all config_vars to opts, so that they will be read and saved
# together with the other configure options.
map (lambda x: opts.AddOptions ((x,)), config_vars)
# Add all config_vars to opts, so that they will be read and saved
# together with the other configure options.
map (lambda x: opts.AddOptions ((x,)), config_vars)
-# Using content checksums prevents rebuilds after [re]configure if
-# config.hh has not changed.
-if env['checksums']:
+if GO_FAST_BUTTON:
+ env['checksums'] = 0
+ SetOption ('max_drift', 1)
+ # SetOption ('implicit_deps_unchanged', 1)
+ print "If scons feels slow, use --implicit-deps-unchanged"
+elif env['checksums']:
+ # Always use checksums (makes more sense than timestamps).
SetOption ('max_drift', 0)
SetOption ('max_drift', 0)
- TargetSignatures ("content")
+ # Using *content* checksums prevents rebuilds after
+ # [re]configure if config.hh has not changed. Too bad that it
+ # is unusably slow.
+ TargetSignatures ('content')
absbuild = Dir (env['build']).abspath
outdir = os.path.join (Dir (env['build']).abspath, env['out'])
absbuild = Dir (env['build']).abspath
outdir = os.path.join (Dir (env['build']).abspath, env['out'])
command = r"""python -c 'import sys; sys.stdout.write ("%s/include/python%s" % (sys.prefix, sys.version[:3]))'""" #"
PYTHON_INCLUDE = os.popen (command).read ()
command = r"""python -c 'import sys; sys.stdout.write ("%s/include/python%s" % (sys.prefix, sys.version[:3]))'""" #"
PYTHON_INCLUDE = os.popen (command).read ()
- env.Append (CPPPATH = PYTHON_INCLUDE)
+ if GO_FAST_BUTTON:
+ env.Append (CCFLAGS = ['-I%s ' % PYTHON_INCLUDE])
+ else:
+ env.Append (CPPPATH = PYTHON_INCLUDE)
headers = ('sys/stat.h', 'assert.h', 'kpathsea/kpathsea.h', 'Python.h')
for i in headers:
headers = ('sys/stat.h', 'assert.h', 'kpathsea/kpathsea.h', 'Python.h')
for i in headers:
if conf.CheckLib ('kpathsea', 'kpse_find_tfm'):
conf.env['DEFINES']['HAVE_KPSE_FIND_TFM'] = '1'
if conf.CheckLib ('kpathsea', 'kpse_find_tfm'):
conf.env['DEFINES']['HAVE_KPSE_FIND_TFM'] = '1'
+ if GO_FAST_BUTTON:
+ cpppath = []
+ if env.has_key ('CPPPATH'):
+ cpppath = env['CPPPATH']
#this could happen after flower...
env.ParseConfig ('guile-config compile')
#this could happen after flower...
env.ParseConfig ('guile-config compile')
conf.env['DEFINES']['HAVE_PANGO_CVS'] = '1'
conf.env['DEFINES']['HAVE_PANGO_FC_FONT_MAP_ADD_DECODER_FIND_FUNC'] = '1'
conf.env['DEFINES']['HAVE_PANGO_CVS'] = '1'
conf.env['DEFINES']['HAVE_PANGO_FC_FONT_MAP_ADD_DECODER_FIND_FUNC'] = '1'
+ if GO_FAST_BUTTON:
+ # Using CCFLAGS = -I<system-dir> rather than CPPPATH = [
+ # <system-dir>] speeds up SCons
+ env['CCFLAGS'] += map (lambda x: '-I' + x,
+ env['CPPPATH'][len (cpppath):])
+ env['CPPPATH'] = cpppath
+
if required:
print
print '********************************'
if required:
print
print '********************************'
LILYPONDPREFIX = os.path.join (run_prefix, 'share/lilypond'),
LIBPATH = [os.path.join (absbuild, 'flower', env['out']),],
LILYPONDPREFIX = os.path.join (run_prefix, 'share/lilypond'),
LIBPATH = [os.path.join (absbuild, 'flower', env['out']),],
- ##CPPPATH = [outdir, '#',], # do not read auto*'s header
CPPPATH = [outdir, ],
LILYPOND_PATH = ['.', '$srcdir/input',
'$srcdir/input/regression',
CPPPATH = [outdir, ],
LILYPOND_PATH = ['.', '$srcdir/input',
'$srcdir/input/regression',
e = env.Copy ()
e.Append (
e = env.Copy ()
e.Append (
- CPPPATH = [outdir, '#/lily/include', '#/flower/include'],
+ CPPPATH = ['#/lily/include', '#/flower/include', outdir],
LEXFLAGS = ['-Cfe', '-p', '-p'],
LIBS = ['flower'],
)
LEXFLAGS = ['-Cfe', '-p', '-p'],
LIBS = ['flower'],
)