|
# Scons configuration file for documentation |
|
1 |
|
|
2 |
# Copyright 2006 by ACcESS MNRF |
######################################################## |
|
# |
|
|
# http://www.access.edu.au |
|
|
# Primary Business: Queensland, Australia |
|
|
# Licensed under the Open Software License version 3.0 |
|
|
# http://www.opensource.org/licenses/osl-3.0.php |
|
|
# |
|
3 |
# |
# |
4 |
|
# Copyright (c) 2003-2008 by University of Queensland |
5 |
|
# Earth Systems Science Computational Center (ESSCC) |
6 |
|
# http://www.uq.edu.au/esscc |
7 |
# |
# |
8 |
# builds the user's guide |
# Primary Business: Queensland, Australia |
9 |
latexmode='-interaction=nonstopmode' |
# Licensed under the Open Software License version 3.0 |
10 |
|
# http://www.opensource.org/licenses/osl-3.0.php |
11 |
|
# |
12 |
|
######################################################## |
13 |
|
|
14 |
|
|
15 |
import os |
import os |
16 |
Import('*') |
Import('*') |
17 |
|
|
18 |
local_env=env.Copy() |
local_env = clone_env(env) |
19 |
|
|
20 |
|
latexmode='-interaction=nonstopmode' |
21 |
|
|
22 |
tex_dir = local_env.Dir('.').srcnode().abspath |
tex_dir = local_env.Dir('.').srcnode().abspath |
23 |
tex= [ env.File(x) for x in os.listdir(tex_dir) if not x.startswith('.') and not os.path.isdir(tex_dir+os.path.sep+x) and os.path.splitext(x)[1] in ['.tex', '.bib', '.sty', '.cfg', '.cls'] ] + \ |
tex= [ env.File(x) for x in os.listdir(tex_dir) if not x.startswith('.') and not os.path.isdir(tex_dir+os.path.sep+x) and os.path.splitext(x)[1] in ['.tex', '.bib', '.sty', '.cfg', '.cls'] ] + \ |
24 |
[ env.File('figures'+os.path.sep+x) for x in os.listdir(tex_dir+os.path.sep+'figures') if not x.startswith('.') ] |
[ env.File('figures'+os.path.sep+x) for x in os.listdir(tex_dir+os.path.sep+'figures') if not x.startswith('.') ] |
25 |
|
|
26 |
env.Command(guide_pdf,tex, |
# We would like any figures in .eps to be converted into .pdfs |
27 |
[ "latex %s guide.tex"%latexmode, \ |
|
28 |
|
figs=[ os.path.splitext(x)[0] for x in os.listdir(tex_dir+os.path.sep+'figures') if not x.startswith('.') and os.path.splitext(x)[1] in ['.eps']] |
29 |
|
|
30 |
|
|
31 |
|
env.Command('guide.pdf',tex, |
32 |
|
[ "epstopdf "+os.path.join('figures',name+".eps")+" -o "\ |
33 |
|
+os.path.join('figures',name+".pdf") for name in figs ]+ \ |
34 |
|
[ "pdflatex %s guide.tex"%latexmode, \ |
35 |
"bibtex guide", \ |
"bibtex guide", \ |
36 |
"makeindex guide", \ |
"makeindex guide", \ |
37 |
"latex %s guide"%latexmode, \ |
"pdflatex %s guide"%latexmode, \ |
38 |
"latex %s guide"%latexmode, \ |
"pdflatex %s guide"%latexmode], \ |
|
"dvipdf guide.dvi %s"%guide_pdf ], |
|
39 |
chdir=tex_dir) |
chdir=tex_dir) |
40 |
|
|
41 |
|
tmp=local_env.InstallAs(target=env['prefix']+'/release/doc/user/guide.pdf', source='guide.pdf') |
42 |
|
|
43 |
|
env.Alias('guide_pdf', tmp) |
44 |
|
|
45 |
|
|
46 |
|
#env.Alias('guide_pdf', env['prefix']+'/release/doc/user/guide.pdf') |
47 |
|
#env.Alias('guide_pdf', tmp) |
48 |
|
|
49 |
|
|
50 |
env.Command(guide_html_index,tex, |
#env.Command(env['prefix']+'/release/doc/user/guide.pdf',tex, |
51 |
"latex2html -top_navigation \ |
#[ mytest(), "latex %s guide.tex"%latexmode, \ |
52 |
|
#"bibtex guide", \ |
53 |
|
#"makeindex guide", \ |
54 |
|
#"latex %s guide"%latexmode, \ |
55 |
|
#"latex %s guide"%latexmode, \ |
56 |
|
#"dvipdf guide.dvi %s"%env['prefix']+'/release/doc/user/guide.pdf' ], |
57 |
|
#chdir=tex_dir) |
58 |
|
#env.Alias('guide_pdf', env['prefix']+'/release/doc/user/guide.pdf') |
59 |
|
|
60 |
|
|
61 |
|
env.Command(env['prefix']+'/release/doc/user/html/index.htm',tex, \ |
62 |
|
["latex2html -top_navigation \ |
63 |
-bottom_navigation \ |
-bottom_navigation \ |
64 |
-index_in_navigation \ |
-index_in_navigation \ |
65 |
-contents_in_navigation \ |
-contents_in_navigation \ |
66 |
-next_page_in_navigation \ |
-next_page_in_navigation \ |
67 |
-previous_page_in_navigation \ |
-previous_page_in_navigation \ |
68 |
-title \"esys user's guide\" \ |
-title \"esys users guide\" \ |
69 |
-noshow_section_numbers \ |
-noshow_section_numbers \ |
70 |
-dir %s -mkdir \ |
-dir \"../../release/doc/user/html\" -mkdir \ |
71 |
-address \"esys@esscc.uq.edu.au\" \ |
-address \"esys@esscc.uq.edu.au\" \ |
72 |
-antialias_text -antialias -transparent \ |
-antialias_text -antialias -transparent \ |
73 |
-noshort_extn \ |
-noshort_extn \ |
74 |
-up_url \"http://www.access.edu.au/escript\", -up_title \"escript\" guide.tex"%os.path.splitext(str(guide_html_index))[0], |
-up_url \"http://www.access.edu.au/escript\", \ |
75 |
chdir=tex_dir) |
-up_title \"escript\" guide.tex"], chdir=tex_dir) |
76 |
|
env.Alias('guide_html', env['prefix']+'/release/doc/user/html/index.htm') |
77 |
|
|