X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Freport.git;a=blobdiff_plain;f=SConstruct;h=2b6fc67519354b2364c255f69690655b9246f34d;hp=29ca6bee3dbadda0409dcfeb1873fae942f6951b;hb=344fd4d4338685c0bc2e66d395edb9409965c438;hpb=32d52cda513c45334ab256c9f42d41ed6938fc48 diff --git a/SConstruct b/SConstruct index 29ca6be..2b6fc67 100644 --- a/SConstruct +++ b/SConstruct @@ -3,16 +3,24 @@ # 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}) @@ -30,4 +38,13 @@ core2core = env.Context('Core2Core') 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)