Line | |
---|
1 | import os,glob,shutil
|
---|
2 |
|
---|
3 | # import root environment
|
---|
4 | Import( "env")
|
---|
5 | myenv = env.Copy()
|
---|
6 | # Maybe someday I can use env.DVI() to execute a re-run....
|
---|
7 | if myenv["makedoc"].lower() == 'pdf':
|
---|
8 | dvif = myenv.File("#/userguide.dvi")
|
---|
9 | tmps = [ "userguide.aux", "userguide.log", "userguide.idx", "userguide.dvi"]
|
---|
10 | myenv.Command(dvif,"userguide.tex",
|
---|
11 | ["$LATEX $SOURCE", "$LATEX $SOURCE"])
|
---|
12 | pdfit = myenv.PDF("#/userguide.pdf", "#/userguide.dvi")
|
---|
13 | myenv.Install("#/doc", pdfit)
|
---|
14 | for f in tmps:
|
---|
15 | myenv.AddPostAction(pdfit, Delete(f))
|
---|
16 | myenv.AddPostAction(pdfit, Move("doc/userguide.pdf", str(pdfit[0])))
|
---|
17 | elif myenv["makedoc"].lower() == 'html':
|
---|
18 | if os.path.exists("/usr/bin/latex2html"):
|
---|
19 | myenv.Command("userguide","userguide.tex",
|
---|
20 | "/usr/bin/latex2html -local_icons $TARGET" )
|
---|
21 | #Return()
|
---|
Note:
See
TracBrowser
for help on using the repository browser.