X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=SConstruct;h=c02b7cc6501ad497b05d4c2315ae630f5d892478;hb=63b650afb727cce067817ce9451eecb932446bf3;hp=2753d30b54cdc4f2eaf57ebdb03913ff0f99d7cc;hpb=62975e5ada1a1a8627f10889b3745f1d9e44f2ab;p=senf.git diff --git a/SConstruct b/SConstruct index 2753d30..c02b7cc 100644 --- a/SConstruct +++ b/SConstruct @@ -8,8 +8,8 @@ import SENFSCons # This hack is needed for SCons V 0.96.1 compatibility. In current SCons versions # we can just use 'env.AlwaysBuild(env.Alias(target), [], action)' -def PhonyTarget(env, target, action): - env.AlwaysBuild(env.Command(target + '.phony', 'SConstruct', env.Action(action))) +def PhonyTarget(env, target, action, sources=[]): + env.AlwaysBuild(env.Command(target + '.phony', [ 'SConstruct' ] + sources, env.Action(action))) env.Alias(target, target + '.phony') def updateRevision(target, source, env): @@ -112,6 +112,7 @@ debsrc Build debian source package debbin Build debian binary package linklint Check links of doxygen documentation with 'linklint' fixlinks Fix broken links in doxygen documentation +valgrind Run all tests under valgrind/memcheck """) if os.environ.get('debian_build'): @@ -168,6 +169,8 @@ if not env.GetOption('clean') and not os.path.exists(".prepare-stamp") \ env.Clean('all', '.prepare-stamp') +# Not nice, but until we get to fixing the dependency jungle +# concerning generated sources ... scripts = [] dependencies = [] @@ -237,6 +240,10 @@ PhonyTarget(env, 'fixlinks', [ PhonyTarget(env, 'prepare', []) +PhonyTarget(env, 'valgrind', [ + 'find -name .test.bin | while read test; do echo; echo "Running $$test"; echo; valgrind --tool=memcheck --error-exitcode=99 --suppressions=valgrind.sup $$test $BOOSTTESTARGS; [ $$? -ne 99 ] || exit 1; done' + ], [ 'all_tests' ]) + env.Clean('all', env.Dir('linklint')) env.Clean('all','.prepare-stamp')