1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#!/usr/bin/python invoke_with_scons
Import('env')
import glob, os.path
# this sconscript will build the ASCEND user's manual and install it in the desired location
if env.get('WITH_DOC_BUILD'):
env.Command('book.tex','book.lyx'
,"lyx --export latex $SOURCE"
)
epsfigs = glob.glob("*.eps")
pdffigs = []
for f in epsfigs:
st,ext = os.path.splitext(f)
pdffigs += env.Command(st+".pdf",f
,"epstopdf --outfile=$TARGET $SOURCE"
)
## @TODO use 'env.PDF()' instead
pdf = env.Command('book.pdf','book.tex'
,"pdflatex book.tex"
,chdir=1
)
env.Depends(pdf,pdffigs)
if env.get('WITH_LATEX2HTML'):
html = env.Command('html/index.html','book.tex'
,"latex2html --show_section_numbers --html_version=4.0 -dir html $SOURCE.file"
,chdir="doc"
)
env.Depends(html,epsfigs)
else:
pdf = "book.pdf"
#------------------------
# doxygen docs for libascend
env.SConscript('libascend/SConscript',['env'])
#------------------------
# install docs
if env.get('CAN_INSTALL') and env.get('WITH_DOC_INSTALL'):
env.InstallShared(Dir(env.subst("$INSTALL_ROOT$INSTALL_DOC")),pdf)
# vim: syntax=python:
|