1 # Based on the Latex SConstruct at
2 # https://gutefee.massey.ac.nz/moin/HOWTO/LaTeX/LaTeX-SCons-Builder
8 #### Some configurations.
10 DEFAULT_TARGET = 'Report.pdf'
12 #### Defining some new builders.
15 ## Context MkIV Builder:
16 contextBuilder = Builder(action='nice texexec --lua $SOURCE',
19 env.Append(BUILDERS={'Context': contextBuilder})
21 # Import tex settings from the user environment
22 env['ENV']['TEXMFCNF'] = os.environ['TEXMFCNF']
23 env['ENV']['HOME'] = os.environ['HOME']
24 # Allow the SSH agent to be used
25 env['ENV']['SSH_AUTH_SOCK'] = os.environ['SSH_AUTH_SOCK']
27 #### The actual builds.
30 core2core = env.Context('Core2Core')
31 Depends(core2core, 'pret-lam.lua')
32 Depends(core2core, 'pret-trans.lua')
35 report = env.Context('Report')
36 Depends(report, glob.glob('pret-*.lua'))
37 Depends(report, glob.glob('Chapters/*.tex'))
38 Depends(report, glob.glob('Utils/*.tex'))
40 AddPostAction(report, 'scp $TARGET ewi:')
42 Default(DEFAULT_TARGET)