X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=SConstruct;h=17e18b6f18d4812a094364ae09f0ccefca46fb1d;hb=c6fb7bc1210f26501d95064eb8e6399a881f884e;hp=33f2decaaebdaae54a02a8b64bf55a0a600eb3ec;hpb=4123b4fe58a7fd4659fa01476581690b47c83600;p=senf.git diff --git a/SConstruct b/SConstruct index 33f2dec..17e18b6 100644 --- a/SConstruct +++ b/SConstruct @@ -1,7 +1,5 @@ # -*- python -*- -from __future__ import with_statement - import sys, os.path, fnmatch import SENFSCons, senfutil, senfconf @@ -65,7 +63,8 @@ env.Append( 'HOME' : os.environ.get('HOME'), 'SSH_AGENT_PID': os.environ.get('SSH_AGENT_PID'), 'SSH_AUTH_SOCK': os.environ.get('SSH_AUTH_SOCK') }, - CLEAN_PATTERNS = [ '*~', '#*#', '*.pyc', 'semantic.cache', '.sconsign*' ], + CLEAN_PATTERNS = [ '*~', '#*#', '*.pyc', 'semantic.cache', '.sconsign*', + '.sconf_temp' ], BUILDDIR = '${FLAVOR and "#/build/$FLAVOR" or "#"}', CPPPATH = [ '#', '$BUILDDIR', @@ -98,11 +97,11 @@ env.Append( INLINE_OPTS_NORMAL = [ '-finline-limit=5000' ], INLINE_OPTS = [ '$INLINE_OPTS_NORMAL' ], CXXFLAGS = [ '-Wall', '-Woverloaded-virtual', '-Wno-long-long', '$INLINE_OPTS', - '$CXXFLAGS_' ], + '-pipe', '$CXXFLAGS_', '-fno-strict-aliasing' ], CXXFLAGS_ = senfutil.BuildTypeOptions('CXXFLAGS'), CXXFLAGS_final = [ '-O3' ], - CXXFLAGS_normal = [ '-O0', '-g' ], - CXXFLAGS_debug = [ '$CXXFLAGS_normal' ], + CXXFLAGS_normal = [ '-O2', '-g' ], + CXXFLAGS_debug = [ '-O0', '-g' ], CPPDEFINES = [ '$expandLogOption', '$CPPDEFINES_' ], expandLogOption = senfutil.expandLogOption, @@ -156,25 +155,25 @@ Export('env') ########################################################################### # Configure -# Default configuration (boost stuff) -senfutil.Configure(env) - @senfconf.Test def CheckValgrind(context): context.Message( "Checking for valgrind... " ) - ret = context.TryAction(['valgrind --version >$TARGET']) + ret = context.TryAction(['$VALGRIND --version >$TARGET']) context.Result( ret[1].strip() or False ) return ret[0] @senfconf.Test def CheckValgrindWildcards(context): context.Message( "Checking whether valgrind supports '...' wildcards in suppressions... " ) - ret = context.TryAction(['valgrind --suppressions=$SOURCE /bin/true'], + ret = context.TryAction(['$VALGRIND --suppressions=$SOURCE /bin/true'], "{\n test_suppression\n Memcheck:Addr4\n ...\n fun:foo\n}\n", ".sup") context.Result( ret[0] ) return ret[0] +# Default configuration (boost stuff) +senfutil.Configure(env) + conf = env.Configure(clean=False, help=False, custom_tests = senfconf.Tests()) env.Replace( HAVE_VALGRIND = conf.CheckValgrind() and conf.CheckValgrindWildcards()