Add a section on simulation.
[matthijs/master-project/report.git] / SConstruct
index fccd78ace7fbb18d69d4691f7a69148b41c24967..05bd779b8305fdcc75f5603fbad8d05b145f836a 100644 (file)
@@ -12,8 +12,15 @@ DEFAULT_TARGET = 'Report.pdf'
 #### Defining some new builders.
 env = Environment()
 
-## Context MkIV Builder:
-contextBuilder = Builder(action='nice 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 = ''
+
+# Limit to 500MB of virtual memory
+contextBuilder = Builder(action='ulimit -v 512000; nice texexec --lua $SOURCE%s' % once,
                          suffix='.pdf',
                          src_suffix='.tex')
 env.Append(BUILDERS={'Context': contextBuilder})