X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fmaster-project%2Freport.git;a=blobdiff_plain;f=SConstruct;h=2b6fc67519354b2364c255f69690655b9246f34d;hp=3411e32d2058068fbc741924a660b9fbf24df6a4;hb=7f1ce9c381d0a8d2c47c02c1b998a19f31c725a1;hpb=1108517b5c84c5fc7c8aa21ac60cd33e28487519 diff --git a/SConstruct b/SConstruct index 3411e32..2b6fc67 100644 --- a/SConstruct +++ b/SConstruct @@ -3,6 +3,7 @@ # import os import os.path +import glob #### Some configurations. @@ -11,8 +12,15 @@ 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 = '' + +# 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}) @@ -32,14 +40,10 @@ Depends(core2core, 'pret-trans.lua') ## Report report = env.Context('Report') -Depends(report, 'pret-lam.lua') -Depends(report, 'pret-trans.lua') -Depends(report, 'pret-haskell.lua') -Depends(report, 'Chapters/State.tex') -Depends(report, 'Utils/Fonts.tex') -Depends(report, 'Utils/Formats.tex') -Depends(report, 'Utils/Lambda.tex') -Depends(report, 'Utils/Shortcuts.tex') +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:')