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

Contents of /trunk/doc/user/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3277 - (show annotations)
Fri Oct 15 01:06:24 2010 UTC (10 years, 1 month ago) by caltinay
File size: 2243 byte(s)
This should keep scons happy on systems without pdflatex issuing a warning
to the user. Also updated all other doc sconscript files to use a global
release_dir prefix so we can easily move the files somewhere else if req'd.

1
2 ########################################################
3 #
4 # Copyright (c) 2003-2010 by University of Queensland
5 # 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 local_env = env.Clone(tools=['pdflatex'])
17
18 tex_src = Glob('*.tex')+Glob('*.bib')+Glob('*.sty')+Glob('*.cfg')+Glob('*.cls')
19 fig_src = Glob('figures/*.eps')
20
21 if 'PDF' in dir(local_env):
22 # Convert eps figures to pdf
23 figures=local_env.EpsToPDF(source=fig_src)
24
25 if local_env['verbose']:
26 interaction='-interaction=nonstopmode'
27 else:
28 interaction='-interaction=batchmode'
29
30 # Define command to include SVN revision
31 local_env.Append(PDFLATEXFLAGS=[interaction,'\\\\newcommand{\\\\RepVersion}{%s\\\\xspace}\\\\input{guide.tex}'%(local_env['svn_revision'])])
32 pdf=local_env.PDF(target='guide.pdf', source='guide.tex')
33 Depends(pdf, figures+tex_src)
34
35 pdf_path=os.path.join(release_dir, 'user', 'guide.pdf')
36 pdf_inst=local_env.InstallAs(target=pdf_path, source=pdf)
37 env.Alias('guide_pdf', pdf_inst)
38 else:
39 env.Alias('guide_pdf', '', 'echo "PDF output not supported!"')
40 env.AlwaysBuild('guide_pdf')
41
42 html_dir=os.path.join(release_dir,'user','html')
43 html=local_env.Command(Dir(html_dir), Dir('.').abspath,
44 ["cd %s && latex2html -top_navigation \
45 -bottom_navigation \
46 -index_in_navigation \
47 -contents_in_navigation \
48 -next_page_in_navigation \
49 -previous_page_in_navigation \
50 -title \"esys users guide\" \
51 -noshow_section_numbers \
52 -dir %s -mkdir \
53 -address \"esys@esscc.uq.edu.au\" \
54 -antialias_text -antialias -transparent \
55 -noshort_extn \
56 -up_url \"https://launchpad.net/escript-finley\" \
57 -up_title \"escript\" guide.tex"%(Dir('.').abspath,html_dir)],
58 source_scanner=DirScanner)
59
60 env.Alias('guide_html', html)
61

  ViewVC Help
Powered by ViewVC 1.1.26