#
import os
import os.path
+import glob
#### Some configurations.
-DEFAULT_TARGET = 'Core2Core.pdf'
+DEFAULT_TARGET = 'Report.pdf'
#### Defining some new builders.
env = Environment()
-## Context MkIV Builder:
-contextBuilder = Builder(action=['texexec --lua $SOURCE','scp $TARGET ewi:'],
+## 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})
Depends(core2core, 'pret-lam.lua')
Depends(core2core, 'pret-trans.lua')
+## Report
+report = env.Context('Report')
+Depends(report, glob.glob('pret-*.lua'))
+Depends(report, glob.glob('Chapters/*.tex'))
+Depends(report, glob.glob('Utils/*.tex'))
+Depends(report, glob.glob('Titlepage.tex'))
+
+AddPostAction(report, 'scp $TARGET ewi:')
+
Default(DEFAULT_TARGET)