From b92b16b7e4ab854699bcd151bad0be7c5d73c0ae Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Sat, 5 Dec 2009 18:19:06 +0100 Subject: [PATCH] Allow passing a once option to scons. --- SConstruct | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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}) -- 2.30.2