#### 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})