From: g0dil Date: Mon, 10 Sep 2007 19:01:32 +0000 (+0000) Subject: Backport SConscript to work with SCons 0.96.1 X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=6dfdbbf4962860466aa70bdfe5b58990f862efc5;p=senf.git Backport SConscript to work with SCons 0.96.1 git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@435 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/SConstruct b/SConstruct index bf5b3eb..8d97ecb 100644 --- a/SConstruct +++ b/SConstruct @@ -6,6 +6,10 @@ import SENFSCons ########################################################################### +def PhonyTarget(env, target, action): + env.AlwaysBuild(env.Command(target + '.phony', 'SConstruct', env.Action(action))) + env.Alias(target, target + '.phony') + def updateRevision(target, source, env): rev = env['ENV']['REVISION'][1:] if ':' in rev: @@ -132,33 +136,35 @@ env.Clean('all', [ os.path.join(path,f) for pattern in env['CLEAN_PATTERNS'] for f in fnmatch.filter(files,pattern) ]) -env.AlwaysBuild(env.Alias('deb', [], [ +PhonyTarget(env, 'deb', [ checkLocalConf, updateRevision, - "$BUILDPACKAGE_COMMAND" ])) + "$BUILDPACKAGE_COMMAND", +]) -env.AlwaysBuild(env.Alias('debsrc', [], [ +PhonyTarget(env, 'debsrc', [ updateRevision, - "$BUILDPACKAGE_COMMAND -S" ])) + "$BUILDPACKAGE_COMMAND -S", +]) -env.AlwaysBuild(env.Alias('debbin', [], [ +PhonyTarget(env, 'debbin', [ checkLocalConf, updateRevision, - "$BUILDPACKAGE_COMMAND -nc" ])) + "$BUILDPACKAGE_COMMAND -nc", +]) -env.AlwaysBuild(env.Alias('linklint', [], [ +PhonyTarget(env, 'linklint', [ 'rm -rf linklint', 'linklint -doc linklint -net -limit 99999999 `find -type d -name html -printf "/%P/@ "`', '[ ! -r linklint/errorX.html ] || python linklint_addnames.py linklint/errorX.html.new', '[ ! -r linklint/errorX.html.new ] || mv linklint/errorX.html.new linklint/errorX.html', '[ ! -r linklint/errorAX.html ] || python linklint_addnames.py linklint/errorAX.html.new', '[ ! -r linklint/errorAX.html.new ] || mv linklint/errorAX.html.new linklint/errorAX.html', - '@echo -e "\\nLokal link check results: linklint/index.html"', - '@echo -e "Remote link check results: linklint/urlindex.html\\n"' -])) + 'echo -e "\\nLokal link check results: linklint/index.html\\nRemote link check results: linklint/urlindex.html\\n"', +]) -env.AlwaysBuild(env.Alias('fixlinks', [ 'linklint' ], [ +PhonyTarget(env, 'fixlinks', [ '[ ! -r linklint/errorX.txt -o ! -r linklint/errorAX.txt ] || python doclib/fix-links.py -s .svn -s linklint -s debian linklint/errorX.txt linklint/errorAX.txt', -])) +]) env.Clean('all', env.Dir('linklint')) diff --git a/admin/build.sh b/admin/build.sh index 213e0aa..c7f2d3f 100755 --- a/admin/build.sh +++ b/admin/build.sh @@ -24,8 +24,8 @@ if grep -qv '^At ' ../svn-update.log; then fi rm -f ../svn-update.log -echo '$ scons -k all' -scons -k all && scons fixlinks +echo '$ scons -k all && scons fixlinks' +scons -k all && scons linklint && scons fixlinks echo -n '# Build completed at '; date --utc exec >../upload.log 2>&1