Various small fixes following from Bert's commentaar.
[matthijs/master-project/report.git] / SConstruct
index 3edfb1d1629e7182ef8772da5a535ed58e837235..a05a298afd1c3997c7f07767511e1055c8db9fc8 100644 (file)
@@ -12,8 +12,14 @@ DEFAULT_TARGET = 'Report.pdf'
 #### Defining some new builders.
 env = Environment()
 
-## Context MkIV Builder:
-contextBuilder = Builder(action='texexec --lua $SOURCE',
+## 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})