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

Contents of /trunk/doc/user/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3259 - (show annotations)
Mon Oct 11 01:48:14 2010 UTC (8 years, 11 months ago) by jfenwick
File size: 3514 byte(s)
Merging dudley and scons updates from branches

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()
17
18 latexmode='-interaction=nonstopmode'
19
20 tex_dir = local_env.Dir('.').srcnode().abspath
21 dir_cmd = "cd "+tex_dir+" && "
22
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'] ] + \
24 [ env.File('figures'+os.path.sep+x) for x in os.listdir(tex_dir+os.path.sep+'figures') if not x.startswith('.') ]
25
26 # We would like any figures in .eps to be converted into .pdf
27 #epsfigs=[ env.File('figures'+os.path.sep+x) for x in os.listdir(tex_dir+os.path.sep+'figures') if not x.startswith('.') and x.endswith('.eps') ]
28
29 epsfigs=[ os.path.join(tex_dir,'figures',x) for x in os.listdir(tex_dir+os.path.sep+'figures') if not x.startswith('.') and x.endswith('.eps') ]
30
31 #figs=[ os.path.join('figures',os.path.splitext(x)[0]+'.pdf') for x in os.listdir(tex_dir+os.path.sep+'figures') if not x.startswith('.') and os.path.splitext(x)[1] in ['.eps']]
32
33 figtarget=local_env.EpsToPDF(source=epsfigs,chdir=tex_dir)
34
35 latexcmd=dir_cmd+"pdflatex %s \\\\newcommand{\\\\RepVersion}{`svnversion`\\\\xspace}\\\\input{guide.tex}"%latexmode
36
37 local_env.Command(env['prefix']+'/doc/user/guide.pdf',[tex, figtarget], \
38 [ latexcmd, \
39 dir_cmd+"bibtex guide", \
40 dir_cmd+"makeindex guide", \
41 latexcmd, \
42 latexcmd] \
43 )
44
45 tmp=local_env.InstallAs(target=env['prefix']+'/release/doc/user/guide.pdf', source=env['prefix']+'/doc/user/guide.pdf')
46
47 env.Alias('guide_pdf', tmp)
48
49 #env.Alias('guide_pdf', env['prefix']+'/release/doc/user/guide.pdf')
50 #env.Alias('guide_pdf', tmp)
51
52 #env.Command(env['prefix']+'/release/doc/user/guide.pdf',tex,
53 #[ mytest(), "latex %s guide.tex"%latexmode, \
54 #"bibtex guide", \
55 #"makeindex guide", \
56 #"latex %s guide"%latexmode, \
57 #"latex %s guide"%latexmode, \
58 #"dvipdf guide.dvi %s"%env['prefix']+'/release/doc/user/guide.pdf' ],
59 #chdir=tex_dir)
60 #env.Alias('guide_pdf', env['prefix']+'/release/doc/user/guide.pdf')
61
62 local_env.Command(env['prefix']+'/release/doc/user/html/index.htm', tex, \
63 [dir_cmd+"latex2html -top_navigation \
64 -bottom_navigation \
65 -index_in_navigation \
66 -contents_in_navigation \
67 -next_page_in_navigation \
68 -previous_page_in_navigation \
69 -title \"esys users guide\" \
70 -noshow_section_numbers \
71 -dir \"../../release/doc/user/html\" -mkdir \
72 -address \"esys@esscc.uq.edu.au\" \
73 -antialias_text -antialias -transparent \
74 -noshort_extn \
75 -up_url \"https://launchpad.net/escript-finley\", \
76 -up_title \"escript\" guide.tex"])
77 env.Alias('guide_html', env['prefix']+'/release/doc/user/html/index.htm')
78

  ViewVC Help
Powered by ViewVC 1.1.26