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