From: Matthijs Kooijman Date: Sat, 5 Dec 2009 17:19:06 +0000 (+0100) Subject: Allow passing a once option to scons. X-Git-Tag: final-thesis~97 X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Freport.git;a=commitdiff_plain;h=b92b16b7e4ab854699bcd151bad0be7c5d73c0ae Allow passing a once option to scons. --- diff --git a/SConstruct b/SConstruct index b4895e8..a05a298 100644 --- a/SConstruct +++ b/SConstruct @@ -12,8 +12,14 @@ DEFAULT_TARGET = 'Report.pdf' #### Defining some new builders. env = Environment() -## Context MkIV Builder: -contextBuilder = Builder(action='nice texexec --lua $SOURCE --once', +## Context MkIV Builder. Allow once=1 to just run once without fixing +# all references and tables. +if ARGUMENTS.get('once'): + once = ' --once' +else: + once = '' + +contextBuilder = Builder(action='nice texexec --lua $SOURCE%s' % once, suffix='.pdf', src_suffix='.tex') env.Append(BUILDERS={'Context': contextBuilder})