|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r51017 - in sandbox/SCons: . libs
From: loonycyborg_at_[hidden]
Date: 2009-02-04 14:45:22
Author: loonycyborg
Date: 2009-02-04 14:45:22 EST (Wed, 04 Feb 2009)
New Revision: 51017
URL: http://svn.boost.org/trac/boost/changeset/51017
Log:
Made use of command-line construction variables. Added boost-specific help text.
Text files modified:
sandbox/SCons/SConstruct | 19 ++++++++++++++++++-
sandbox/SCons/libs/SConscript | 10 +++++-----
2 files changed, 23 insertions(+), 6 deletions(-)
Modified: sandbox/SCons/SConstruct
==============================================================================
--- sandbox/SCons/SConstruct (original)
+++ sandbox/SCons/SConstruct 2009-02-04 14:45:22 EST (Wed, 04 Feb 2009)
@@ -1,7 +1,24 @@
# vi: syntax=python:et:ts=4
EnsureSConsVersion(0, 98, 5)
-env = Environment(toolpath = ["tools/scons"], tools = ["default", "boost-libs", "boost-build-variants"])
+vars = Variables("build-config.py")
+vars.AddVariables(
+ ListVariable("variant", "Build configuration", "release", ["release", "debug"]),
+ ListVariable("link", "Library linking", "all", ["static", "dynamic"])
+)
+env = Environment(toolpath = ["tools/scons"], tools = ["default", "boost-libs", "boost-build-variants"], variables = vars)
+vars.Save("build-config.py", env)
Export("env")
+Help("""
+Usage: scons [--option...] [variable=value...] [target...]
+target is a library name, e.g. 'iostreams' or 'signals'
+variable may be one of:
+""" + vars.GenerateHelpText(env, sort=cmp) + """
+Variables are saved in build-config.py and persist between scons invocations.
+""")
+
+if(GetOption("help")):
+ Return()
+
SConscript("libs/SConscript")
Modified: sandbox/SCons/libs/SConscript
==============================================================================
--- sandbox/SCons/libs/SConscript (original)
+++ sandbox/SCons/libs/SConscript 2009-02-04 14:45:22 EST (Wed, 04 Feb 2009)
@@ -8,11 +8,11 @@
)
sconscripts = Glob("*/build/SConscript")
-for debug_release in ["debug", "release"]:
- for linking in ["static", "dynamic"]:
- env["DEBUG_RELEASE_CCFLAGS"] = env.get(debug_release.upper() + "_CCFLAGS")
- env["DEBUG_RELEASE_LIBFLAGS"] = env.get(debug_release.upper() + "_LIBFLAGS")
- env.AppendUnique(CPPDEFINES = ["${LINK_DYNAMIC and 'BOOST_' + BOOST_LIB + '_DYN_LINK=1' or []}"])
+env.AppendUnique(CPPDEFINES = ["${LINK_DYNAMIC and 'BOOST_' + BOOST_LIB + '_DYN_LINK=1' or []}"])
+for debug_release in env["variant"]:
+ env["DEBUG_RELEASE_CCFLAGS"] = env.get(debug_release.upper() + "_CCFLAGS")
+ env["DEBUG_RELEASE_LIBFLAGS"] = env.get(debug_release.upper() + "_LIBFLAGS")
+ for linking in env["link"]:
if linking == "dynamic":
env["LINK_DYNAMIC"] = True
else:
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