allow the use of snapshot version os scons, improve efficiency

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19745 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Bo Peng 2007-08-23 03:03:54 +00:00
parent b1401eb791
commit 04e741ac94

View File

@ -46,6 +46,8 @@ EnsurePythonVersion(2, 3)
EnsureSConsVersion(0, 96) EnsureSConsVersion(0, 96)
# also check for minor version number for scons 0.96 # also check for minor version number for scons 0.96
from SCons import __version__ from SCons import __version__
# allow the use of snapshot version of scons
__version__ = __version__.split('d')[0]
version = map(int, __version__.split('.')) version = map(int, __version__.split('.'))
if version[0] == 0 and version[1] == 96 and version[2] < 92: if version[0] == 0 and version[1] == 96 and version[2] < 92:
print "Scons >= 0.96.92 is required." print "Scons >= 0.96.92 is required."
@ -1287,14 +1289,9 @@ env['CPPPATH'] += ['$BUILDDIR/common', '$TOP_SRCDIR/src']
# Separating boost directories from CPPPATH stops scons from building # Separating boost directories from CPPPATH stops scons from building
# the dependency tree for boost header files, and effectively reduce # the dependency tree for boost header files, and effectively reduce
# the null build time of lyx from 29s to 16s. Since lyx may tweak local # the null build time of lyx from 29s to 16s. Since lyx may tweak local
# boost headers, this is only done for system boost headers. # boost headers, the following is not 100% safe.
if included_boost: # env.AppendUnique(CPPPATH = ['$BOOST_INC_PATH'])
env.AppendUnique(CPPPATH = ['$BOOST_INC_PATH']) env.PrependUnique(CCFLAGS = ['$INCPREFIX$BOOST_INC_PATH'])
else:
if use_vc:
env.PrependUnique(CCFLAGS = ['/I$BOOST_INC_PATH'])
else:
env.PrependUnique(CCFLAGS = ['-I$BOOST_INC_PATH'])
# for intl/config.h, intl/libintl.h and intl/libgnuintl.h # for intl/config.h, intl/libintl.h and intl/libgnuintl.h
if env['nls'] and included_gettext: if env['nls'] and included_gettext:
@ -1570,7 +1567,8 @@ if build_boost:
boostenv = env.Copy() boostenv = env.Copy()
# #
# boost use its own config.h # boost use its own config.h
boostenv['CPPPATH'] = ['$TOP_SRCDIR/boost', '$BUILDDIR/boost'] + extra_inc_paths boostenv['CPPPATH'] = ['$BUILDDIR/boost'] + extra_inc_paths
boostenv['CCFLAGS'] = ['$INCPREFIX$TOP_SRCDIR/boost']
boostenv.AppendUnique(CCFLAGS = ['-DBOOST_USER_CONFIG="<config.h>"']) boostenv.AppendUnique(CCFLAGS = ['-DBOOST_USER_CONFIG="<config.h>"'])
for lib in boost_libs: for lib in boost_libs:
@ -1721,7 +1719,6 @@ if build_controllers:
) )
Alias('controllers', controllers) Alias('controllers', controllers)
# #
# src/frontend/qt4 # src/frontend/qt4
# #