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

Contents of /trunk/doc/user/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3982 - (show annotations)
Fri Sep 21 03:23:22 2012 UTC (6 years, 11 months ago) by jfenwick
File size: 3029 byte(s)
More edits + removing pyvisi from trunk

1
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2012 by University of Queensland
5 # http://www.uq.edu.au
6 #
7 # Primary Business: Queensland, Australia
8 # Licensed under the Open Software License version 3.0
9 # http://www.opensource.org/licenses/osl-3.0.php
10 #
11 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 # Development since 2012 by School of Earth Sciences
13 #
14 ##############################################################################
15
16 import os
17 Import('*')
18 local_env = env.Clone(tools=['pdflatex'])
19
20 tex_src = Glob('*.tex')+Glob('*.bib')+Glob('*.sty')+Glob('*.cfg')+Glob('*.cls')
21 fig_src = Glob('figures/*.eps')
22
23 # Target that converts eps figures to pdf and adds png files
24 figures=local_env.EpsToPDF(source=fig_src) + Glob('figures/*.png')
25
26 if local_env['pdflatex']:
27 if local_env['verbose']:
28 interaction='-interaction=nonstopmode'
29 else:
30 interaction='-interaction=batchmode'
31
32 # Define command to include SVN revision
33 local_env.Append(PDFLATEXFLAGS=[interaction,'\\\\newcommand{\\\\RepVersion}{%s\\\\xspace}\\\\input{user.tex}'%(local_env['svn_revision'])])
34 pdf=local_env.PDF(target='user.pdf', source='user.tex')
35 Depends(pdf, figures+tex_src)
36
37 pdf_path=os.path.join(release_dir, 'user', 'user.pdf')
38 # Work around an issue in SCons v1.0 where the list returned by env.PDF
39 # has too many elements
40 import SCons
41 scons_major_ver=int(SCons.__version__.split('.')[0])
42 if scons_major_ver>1:
43 pdf_inst=local_env.InstallAs(target=pdf_path, source=pdf)
44 else:
45 pdf_inst=local_env.InstallAs(target=pdf_path, source='user.pdf')
46 env.Alias('user_pdf', pdf_inst)
47 else:
48 env.Alias('user_pdf', '', '@echo "Not building user\'s guide: PDF output not supported!"')
49 env.AlwaysBuild('user_pdf')
50
51 # html version
52 #html_dir=os.path.join(release_dir,'user','html')
53 #html=local_env.Command(Dir(html_dir), tex_src+fig_src,
54 # [Delete(Dir('html')),
55 # Copy(Dir('html'), '${SOURCE.srcdir}'),
56 # Delete(Dir('html/figures')),
57 # Copy(Dir('html/figures'), Dir('figures')),
58 # #Delete(html_dir),
59 # Mkdir(html_dir),
60 # "cd %s && latex2html -top_navigation \
61 # -bottom_navigation \
62 # -index_in_navigation \
63 # -contents_in_navigation \
64 # -next_page_in_navigation \
65 # -previous_page_in_navigation \
66 # -title \"esys users guide\" \
67 # -noshow_section_numbers \
68 # -dir %s -mkdir \
69 # -address \"esys@esscc.uq.edu.au\" \
70 # -antialias_text -antialias -transparent \
71 # -noshort_extn \
72 # -up_url \"https://launchpad.net/escript-finley\" \
73 # -up_title \"escript\" guide.tex"%(Dir('html').abspath,html_dir)])
74 #env.Alias('guide_html', [figures,html])
75 #env.AlwaysBuild(Dir(html_dir))
76

  ViewVC Help
Powered by ViewVC 1.1.26