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

Contents of /trunk/doc/user/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6651 - (show annotations)
Wed Feb 7 02:12:08 2018 UTC (2 years ago) by jfenwick
File size: 3018 byte(s)
Make everyone sad by touching all the files

Copyright dates update

1
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2018 by The University of Queensland
5 # http://www.uq.edu.au
6 #
7 # Primary Business: Queensland, Australia
8 # Licensed under the Apache License, version 2.0
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 # Development 2012-2013 by School of Earth Sciences
13 # Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 #
15 ##############################################################################
16
17 import os
18 Import('*')
19 local_env = env.Clone(tools=['pdflatex'])
20
21 tex_src = Glob('*.tex')+Glob('*.bib')+Glob('*.sty')+Glob('*.cfg')+Glob('*.cls')
22 #fig_src = Glob('figures/*.eps')
23
24 figures=Glob('figures/*.png') + Glob('figures/*.pdf')
25
26 if local_env['pdflatex']:
27 if local_env['verbose']:
28 interaction='-interaction=nonstopmode'
29 else:
30 interaction='-interaction=batchmode'
31
32 # Define command to include SVN revision
33 local_env.Append(PDFLATEXFLAGS=[interaction,'\\\\newcommand{\\\\RepVersion}{%s\\\\xspace}\\\\input{user.tex}'%(local_env['svn_revision'])])
34 pdf=local_env.PDF(target='user.pdf', source='user.tex')
35 Depends(pdf, figures+tex_src)
36
37 pdf_path=os.path.join(release_dir, 'user', 'user.pdf')
38 # Work around an issue in SCons v1.0 where the list returned by env.PDF
39 # has too many elements
40 import SCons
41 scons_major_ver=int(SCons.__version__.split('.')[0])
42 if scons_major_ver>1:
43 pdf_inst=local_env.InstallAs(target=pdf_path, source=pdf)
44 else:
45 pdf_inst=local_env.InstallAs(target=pdf_path, source='user.pdf')
46 env.Alias('user_pdf', pdf_inst)
47 else:
48 env.Alias('user_pdf', '', '@echo "Not building user\'s guide: PDF output not supported!"')
49 env.AlwaysBuild('user_pdf')
50
51 # html version
52 #html_dir=os.path.join(release_dir,'user','html')
53 #html=local_env.Command(Dir(html_dir), tex_src+fig_src,
54 # [Delete(Dir('html')),
55 # Copy(Dir('html'), '${SOURCE.srcdir}'),
56 # Delete(Dir('html/figures')),
57 # Copy(Dir('html/figures'), Dir('figures')),
58 # #Delete(html_dir),
59 # Mkdir(html_dir),
60 # "cd %s && latex2html -top_navigation \
61 # -bottom_navigation \
62 # -index_in_navigation \
63 # -contents_in_navigation \
64 # -next_page_in_navigation \
65 # -previous_page_in_navigation \
66 # -title \"esys users guide\" \
67 # -noshow_section_numbers \
68 # -dir %s -mkdir \
69 # -address \"esys@esscc.uq.edu.au\" \
70 # -antialias_text -antialias -transparent \
71 # -noshort_extn \
72 # -up_url \"https://launchpad.net/escript-finley\" \
73 # -up_title \"escript\" guide.tex"%(Dir('html').abspath,html_dir)])
74 #env.Alias('guide_html', [figures,html])
75 #env.AlwaysBuild(Dir(html_dir))
76

  ViewVC Help
Powered by ViewVC 1.1.26