Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51477 - in sandbox/SCons: . tools/scons
From: loonycyborg_at_[hidden]
Date: 2009-02-27 16:48:21


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

Log:
Added --stage option.

Text files modified:
   sandbox/SCons/SConstruct | 3 ++-
   sandbox/SCons/tools/scons/boost-libs.py | 7 ++++++-
   2 files changed, 8 insertions(+), 2 deletions(-)

Modified: sandbox/SCons/SConstruct
==============================================================================
--- sandbox/SCons/SConstruct (original)
+++ sandbox/SCons/SConstruct 2009-02-27 16:48:20 EST (Fri, 27 Feb 2009)
@@ -6,7 +6,8 @@
     ListVariable("variant", "Build configuration", "release", ["release", "debug", "profile"]),
     ListVariable("link", "Library linking", "all", ["static", "dynamic"]),
     ListVariable("threading", "Multi-threading support", "multi", ["single", "multi"]),
- EnumVariable("layout", "Layout of library names and header locations", "versioned", ["versioned", "system"])
+ EnumVariable("layout", "Layout of library names and header locations", "versioned", ["versioned", "system"]),
+ PathVariable("stagedir", "If --stage is passed install only compiled library files in this location", "stage", PathVariable.PathAccept)
 )
 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)

Modified: sandbox/SCons/tools/scons/boost-libs.py
==============================================================================
--- sandbox/SCons/tools/scons/boost-libs.py (original)
+++ sandbox/SCons/tools/scons/boost-libs.py 2009-02-27 16:48:20 EST (Fri, 27 Feb 2009)
@@ -1,5 +1,6 @@
 # vi: syntax=python:et:ts=4
 import distutils.sysconfig
+from SCons.Script import AddOption
 
 def BoostLibrary(env, lib, sources):
     if env["LINK_DYNAMIC"]:
@@ -7,7 +8,9 @@
     else:
         lib_node = env.StaticLibrary("boost_" + lib + env["BOOST_SUFFIX"], sources)
 
- env.Alias(lib, lib_node)
+ if env.GetOption("stage"):
+ env.Alias(lib, env.Install(env.Dir("$stagedir", "#"), lib_node))
+ env.Default(env.Alias(lib, lib_node))
     return lib_node
 
 def BoostUseLib(env, lib):
@@ -29,3 +32,5 @@
     env.AddMethod(BoostLibrary)
     env.AddMethod(BoostUseLib)
     env.AddMethod(PythonExtension)
+
+ AddOption('--stage', dest='stage', action="store_true")


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