speed up scons by > 2x

This commit is contained in:
Dane Springmeyer 2012-07-06 18:08:19 -07:00
parent 269569250c
commit 17d3414b7a
3 changed files with 10 additions and 6 deletions

View file

@ -1,13 +1,13 @@
all: mapnik
install:
python scons/scons.py install
@python scons/scons.py --silent --config=cache --implicit-deps-unchanged --max-drift=1 install
mapnik:
python scons/scons.py
@python scons/scons.py --silent --config=cache --implicit-deps-unchanged --max-drift=1
clean:
python scons/scons.py -c
python scons/scons.py --silent -c --config=cache --implicit-deps-unchanged --max-drift=1
reset:
if test -e ".sconf_temp/"; then rm -r ".sconf_temp/"; fi
@ -15,7 +15,7 @@ reset:
if test -e "config.cache"; then rm "config.cache"; fi
uninstall:
python scons/scons.py uninstall
python scons/scons.py --silent --config=cache --implicit-deps-unchanged --max-drift=1 uninstall
test:
@echo "*** Running visual tests..."

View file

@ -111,6 +111,8 @@ PLUGINS = { # plugins with external dependencies
#### SCons build options and initial setup ####
env = Environment(ENV=os.environ)
env.Decider('MD5-timestamp')
env.SourceCode(".", None)
def color_print(color,text,newline=True):
# 1 - red
@ -932,6 +934,8 @@ if not preconfigured:
color_print(1,"SCons CONFIG not found: '%s'" % conf)
# Recreate the base environment using modified `opts`
env = Environment(ENV=os.environ,options=opts)
env.Decider('MD5-timestamp')
env.SourceCode(".", None)
env['USE_CONFIG'] = True
else:
color_print(4,'SCons USE_CONFIG specified as false, will not inherit variables python config file...')
@ -1146,6 +1150,7 @@ if not preconfigured:
# if the user is not setting custom boost configuration
# enforce boost version greater than or equal to BOOST_MIN_VERSION
if not conf.CheckBoost(BOOST_MIN_VERSION):
color_print(4,'Found boost lib version... %s' % env.get('BOOST_LIB_VERSION_FROM_HEADER') )
color_print(1,'Boost version %s or greater is required' % BOOST_MIN_VERSION)
if not env['BOOST_VERSION']:
env['MISSING_DEPS'].append('boost version >=%s' % BOOST_MIN_VERSION)
@ -1660,7 +1665,6 @@ if not HELP_REQUESTED:
# But let's also cache implicit deps...
EnsureSConsVersion(0,98)
SetOption('implicit_cache', 1)
env.Decider('MD5-timestamp')
SetOption('max_drift', 1)
else:

2
configure vendored
View file

@ -1,3 +1,3 @@
#!/bin/sh
python scons/scons.py configure "$@"
python scons/scons.py --implicit-cache configure "$@"