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 |
# Convert eps figures to pdf |
22 |
figures=local_env.EpsToPDF(source=fig_src) |
23 |
|
24 |
if local_env['verbose']: |
25 |
interaction='-interaction=nonstopmode' |
26 |
else: |
27 |
interaction='-interaction=batchmode' |
28 |
|
29 |
# Define command to include SVN revision |
30 |
local_env.Append(PDFLATEXFLAGS=[interaction,'\\\\newcommand{\\\\RepVersion}{%s\\\\xspace}\\\\input{guide.tex}'%(local_env['svn_revision'])]) |
31 |
pdf=local_env.PDF(target='guide.pdf', source='guide.tex') |
32 |
Depends(pdf, figures+tex_src) |
33 |
|
34 |
pdf_inst=local_env.InstallAs(target=env['prefix']+'/release/doc/user/guide.pdf', source=pdf) |
35 |
|
36 |
env.Alias('guide_pdf', pdf_inst) |
37 |
|
38 |
html_dir=os.path.join(env['prefix'],'release','doc','user','html') |
39 |
|
40 |
html=local_env.Command(Dir(html_dir), tex_src+figures, |
41 |
["cd %s && latex2html -top_navigation \ |
42 |
-bottom_navigation \ |
43 |
-index_in_navigation \ |
44 |
-contents_in_navigation \ |
45 |
-next_page_in_navigation \ |
46 |
-previous_page_in_navigation \ |
47 |
-title \"esys users guide\" \ |
48 |
-noshow_section_numbers \ |
49 |
-dir %s -mkdir \ |
50 |
-address \"esys@esscc.uq.edu.au\" \ |
51 |
-antialias_text -antialias -transparent \ |
52 |
-noshort_extn \ |
53 |
-up_url \"https://launchpad.net/escript-finley\" \ |
54 |
-up_title \"escript\" guide.tex"%(Dir('.').abspath, html_dir)]) |
55 |
|
56 |
env.Alias('guide_html', html) |
57 |
|