/[escript]/trunk/doc/cookbook/SConscript
ViewVC logotype

Annotation of /trunk/doc/cookbook/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3337 - (hide annotations)
Fri Nov 5 03:20:19 2010 UTC (9 years ago) by jfenwick
File size: 1307 byte(s)
Work around weird scons behaviour

1 jfenwick 2667
2     ########################################################
3     #
4 jfenwick 2881 # Copyright (c) 2009-2010 by University of Queensland
5 jfenwick 2667 # Earth Systems Science Computational Center (ESSCC)
6     # http://www.uq.edu.au/esscc
7     #
8     # Primary Business: Queensland, Australia
9     # Licensed under the Open Software License version 3.0
10     # http://www.opensource.org/licenses/osl-3.0.php
11     #
12     ########################################################
13    
14     import os
15     Import('*')
16 caltinay 3277 local_env = env.Clone(tools=['pdflatex'])
17 jfenwick 2667
18 caltinay 3272 tex_src = Glob('*.tex')+Glob('*.bib')+Glob('*.sty')+Glob('*.cfg')+Glob('*.cls')
19     fig_src = Glob('figures/*.png')
20 jfenwick 2667
21 caltinay 3277 if 'PDF' in dir(local_env):
22     if local_env['verbose']:
23     interaction='-interaction=nonstopmode'
24     else:
25     interaction='-interaction=batchmode'
26 jfenwick 2667
27 caltinay 3277 # Define command to include SVN revision
28     local_env.Append(PDFLATEXFLAGS=[interaction,'\\\\newcommand{\\\\RepVersion}{%s\\\\xspace}\\\\input{cookbook.tex}'%(local_env['svn_revision'])])
29     pdf=local_env.PDF(target='cookbook.pdf', source='cookbook.tex')
30     Depends(pdf, fig_src+tex_src)
31 jfenwick 2667
32 jfenwick 3337 pdf_inst=local_env.InstallAs(target=env['prefix']+'/release/doc/cookbook/cookbook.pdf', source='cookbook.pdf')
33 jfenwick 2667
34 caltinay 3277 env.Alias('cookbook_pdf', pdf_inst)
35     else:
36     env.Alias('cookbook_pdf', '', 'echo "PDF output not supported!"')
37     env.AlwaysBuild('cookbook_pdf')
38 jfenwick 2667

  ViewVC Help
Powered by ViewVC 1.1.26