Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51348 - in sandbox/SCons: . libs tools/scons
From: loonycyborg_at_[hidden]
Date: 2009-02-20 09:11:18


Author: loonycyborg
Date: 2009-02-20 09:11:16 EST (Fri, 20 Feb 2009)
New Revision: 51348
URL: http://svn.boost.org/trac/boost/changeset/51348

Log:
Store build dir in a construction variable instead of hardcoding it everywhere.

Text files modified:
   sandbox/SCons/SConstruct | 5 +++--
   sandbox/SCons/libs/SConscript | 2 +-
   sandbox/SCons/tools/scons/boost-build-variants.py | 7 ++++++-
   sandbox/SCons/tools/scons/boost-configure.py | 2 +-
   4 files changed, 11 insertions(+), 5 deletions(-)

Modified: sandbox/SCons/SConstruct
==============================================================================
--- sandbox/SCons/SConstruct (original)
+++ sandbox/SCons/SConstruct 2009-02-20 09:11:16 EST (Fri, 20 Feb 2009)
@@ -1,6 +1,5 @@
 # vi: syntax=python:et:ts=4
 EnsureSConsVersion(0, 98, 3)
-SConsignFile("bin.SCons/sconsign.dblite")
 
 vars = Variables("build-config.py")
 vars.AddVariables(
@@ -8,7 +7,7 @@
     ListVariable("link", "Library linking", "all", ["static", "dynamic"]),
     ListVariable("threading", "Multi-threading support", "multi", ["single", "multi"])
 )
-env = Environment(toolpath = ["tools/scons"], tools = ["default", "boost-libs", "boost-build-variants", "boost-configure"], variables = vars)
+env = Environment(toolpath = ["tools/scons"], tools = ["default", "boost-libs", "boost-build-variants", "boost-configure"], variables = vars, config_log = "$BOOST_BUILD_DIR/config.log")
 vars.Save("build-config.py", env)
 Export("env")
 
@@ -23,4 +22,6 @@
 if(GetOption("help")):
     Return()
 
+SConsignFile(File(env.subst("$BOOST_BUILD_DIR/sconsign.dblite")).path)
+
 SConscript("libs/SConscript")

Modified: sandbox/SCons/libs/SConscript
==============================================================================
--- sandbox/SCons/libs/SConscript (original)
+++ sandbox/SCons/libs/SConscript 2009-02-20 09:11:16 EST (Fri, 20 Feb 2009)
@@ -23,7 +23,7 @@
         for threading in env["threading"]:
             env.SetProperty(threading = threading)
 
- target_dir = "#/bin.SCons/libs/" + variant + "/" + linking + "/threading-" + threading
+ target_dir = env["BOOST_BUILD_DIR"] + "/libs/" + variant + "/" + linking + "/threading-" + threading
             VariantDir(src_dir = ".", variant_dir = target_dir, duplicate = False)
             for sconscript in sconscripts:
                 lib = str(sconscript.get_dir().up())

Modified: sandbox/SCons/tools/scons/boost-build-variants.py
==============================================================================
--- sandbox/SCons/tools/scons/boost-build-variants.py (original)
+++ sandbox/SCons/tools/scons/boost-build-variants.py 2009-02-20 09:11:16 EST (Fri, 20 Feb 2009)
@@ -50,6 +50,11 @@
     return True
 
 def generate(env):
- env["CXXFLAGS"] = Split("-ftemplate-depth-128 -Wall")
     env.AddMethod(SetProperty)
     env.AddMethod(_AppendFeatureFlag)
+
+ env.Replace(
+ CXXFLAGS = Split("-ftemplate-depth-128 -Wall"),
+ BOOST_BUILD_DIR = "#/bin.SCons"
+ )
+

Modified: sandbox/SCons/tools/scons/boost-configure.py
==============================================================================
--- sandbox/SCons/tools/scons/boost-configure.py (original)
+++ sandbox/SCons/tools/scons/boost-configure.py 2009-02-20 09:11:16 EST (Fri, 20 Feb 2009)
@@ -10,7 +10,7 @@
     def __call__(self, env):
         if not self.checked:
             conf_env = env.Clone()
- build_dir = "#/bin.SCons/"
+ build_dir = "$BOOST_BUILD_DIR/"
             self.conf = conf_env.Configure(conf_dir = build_dir + "sconf_temp", log_file = build_dir + "config.log")
             self.Check(conf_env)
             self.conf.Finish()


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk