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

Contents of /trunk/doc/user/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3604 - (show annotations)
Mon Sep 19 04:47:53 2011 UTC (8 years, 2 months ago) by caltinay
File size: 2910 byte(s)
Changed detection of pdflatex since some versions of scons require .ltx or
.latex file extensions when pdflatex is not available.
Also added cleanup of utest.sh and buildvars file.

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 # Target that converts eps figures to pdf and adds png files
22 figures=local_env.EpsToPDF(source=fig_src) + Glob('figures/*.png')
23
24 if local_env['pdflatex']:
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{user.tex}'%(local_env['svn_revision'])])
32 pdf=local_env.PDF(target='user.pdf', source='user.tex')
33 Depends(pdf, figures+tex_src)
34
35 pdf_path=os.path.join(release_dir, 'user', 'user.pdf')
36 # Work around an issue in SCons v1.0 where the list returned by env.PDF
37 # has too many elements
38 import SCons
39 scons_major_ver=int(SCons.__version__.split('.')[0])
40 if scons_major_ver>1:
41 pdf_inst=local_env.InstallAs(target=pdf_path, source=pdf)
42 else:
43 pdf_inst=local_env.InstallAs(target=pdf_path, source='user.pdf')
44 env.Alias('user_pdf', pdf_inst)
45 else:
46 env.Alias('user_pdf', '', '@echo "Not building user\'s guide: PDF output not supported!"')
47 env.AlwaysBuild('user_pdf')
48
49 # html version
50 #html_dir=os.path.join(release_dir,'user','html')
51 #html=local_env.Command(Dir(html_dir), tex_src+fig_src,
52 # [Delete(Dir('html')),
53 # Copy(Dir('html'), '${SOURCE.srcdir}'),
54 # Delete(Dir('html/figures')),
55 # Copy(Dir('html/figures'), Dir('figures')),
56 # #Delete(html_dir),
57 # Mkdir(html_dir),
58 # "cd %s && latex2html -top_navigation \
59 # -bottom_navigation \
60 # -index_in_navigation \
61 # -contents_in_navigation \
62 # -next_page_in_navigation \
63 # -previous_page_in_navigation \
64 # -title \"esys users guide\" \
65 # -noshow_section_numbers \
66 # -dir %s -mkdir \
67 # -address \"esys@esscc.uq.edu.au\" \
68 # -antialias_text -antialias -transparent \
69 # -noshort_extn \
70 # -up_url \"https://launchpad.net/escript-finley\" \
71 # -up_title \"escript\" guide.tex"%(Dir('html').abspath,html_dir)])
72 #env.Alias('guide_html', [figures,html])
73 #env.AlwaysBuild(Dir(html_dir))
74

  ViewVC Help
Powered by ViewVC 1.1.26