Enhance senfutil client-project handling
[senf.git] / SConstruct
index 08a96af..c204326 100644 (file)
@@ -3,7 +3,6 @@
 import sys, os.path, fnmatch
 import SENFSCons, senfutil, senfconf
 
-
 ###########################################################################
 # Load utilities and setup libraries and configure build
 
@@ -104,7 +103,7 @@ env.Append(
    CPPDEFINES             = [ '$expandLogOption', '$CPPDEFINES_' ],
    expandLogOption        = senfutil.expandLogOption,
    CPPDEFINES_            = senfutil.BuildTypeOptions('CPPDEFINES'),
-   CPPDEFINES_final       = [ 'SENF_PPI_NOTRACE'],
+   CPPDEFINES_final       = [ 'SENF_PPI_NOTRACE', 'BOOST_NO_MT' ],
    CPPDEFINES_normal      = [ 'SENF_DEBUG' ],
    CPPDEFINES_debug       = [ '$CPPDEFINES_normal' ],
 
@@ -121,8 +120,8 @@ env.SetDefault(
     GENHTML           = "genhtml",
     VALGRIND          = "valgrind",
     SCONSBIN          = env.File("#/tools/scons"),
-    SCONSARGS         = [ '-Q', '-j$CONCURRENCY_LEVEL', 'debug=$debug', 'final=$final' ] + \
-        [ '%s=%s' % (k,v) for k,v in ARGUMENTS.iteritems() ],
+    SCONSARGS         = ([ '-Q', '-j$CONCURRENCY_LEVEL' ] + 
+                         [ '%s=%s' % (k,v) for k,v in ARGUMENTS.iteritems() ]),
     SCONS             = "@$SCONSBIN $SCONSARGS",
     CONCURRENCY_LEVEL = env.GetOption('num_jobs') or 1,
     TOPDIR            = env.Dir('#').abspath,
@@ -131,6 +130,10 @@ env.SetDefault(
     FLAVOR            = '',
 )
 
+env.Replace(
+    _defines          = senfutil.expandDefines
+)
+
 # Set variables from command line
 senfutil.parseArguments(
     env,
@@ -172,14 +175,12 @@ def CheckValgrindWildcards(context):
     context.Result( ret[0] )
     return ret[0]
 
-# Default configuration (boost stuff)
-senfutil.Configure(env)
+def customChecks(conf):
+    conf.env.Replace(
+        HAVE_VALGRIND  = conf.CheckValgrind() and conf.CheckValgrindWildcards()
+        )
 
-conf = env.Configure(clean=False, help=False, custom_tests = senfconf.Tests())
-env.Replace(
-    HAVE_VALGRIND  = conf.CheckValgrind() and conf.CheckValgrindWildcards()
-)
-conf.Finish()
+senfutil.Configure(env, customChecks)
 
 # Only add this here, after all configure checks have run