0
|
1 all: manual.pdf
|
|
2
|
|
3 sources: *.tex callconvs/*.tex dyncall_logo.* dyncall_watermark.*
|
|
4
|
72
|
5 pdf: manual.pdf
|
|
6
|
|
7 html:: html/manual.html
|
|
8 #html-single: html/manual.html
|
|
9 #html-split: html/manual.html
|
|
10
|
|
11 clean:
|
|
12 # pdf
|
|
13 cd "${VPATH}" && for i in pdf aux lof log lol lot out toc; do rm -f manual.$$i || true; done
|
|
14 # html
|
|
15 cd "${VPATH}" && ( \
|
|
16 for i in 4ct 4tc css dvi html idv lg tmp xref; do rm -f manual.$$i || true; done; \
|
|
17 for i in manual*x.png manual*.html texput.log manual_*.log zzmanual.eps zzmanual.ps custom_tex4ht.env; do rm -f $$i || true; done; \
|
|
18 rm -r html || true; \
|
|
19 )
|
|
20
|
|
21
|
|
22 # Main target dependencies --->
|
0
|
23
|
71
|
24 manual_website_menu.html:
|
|
25 curl -s http://www.dyncall.org | sed '/<body>/,/<div class="mainDiv">/p;d' | sed 's/^.*<body>//;s/<div class="mainDiv">.*$$//' > $@
|
|
26
|
|
27 html/manual.html: manual_tex4ht.cfg manual_website_menu.html sources
|
0
|
28 # Create tex4ht.env from default one, but with better bitmaps
|
70
|
29 cd "${VPATH}" && ( \
|
|
30 cp $$(dirname $$(which tex4ht))/../share/texmf-dist/tex4ht/base/unix/tex4ht.env ./custom_tex4ht.env; \
|
|
31 sed -E -i '' 's/(Text|Graphics)(AlphaBits)=[1,2,3]([^0-9])/\1\2=4\3/g' custom_tex4ht.env; \
|
|
32 mkdir -p ./html/; \
|
72
|
33 htlatex manual.tex manual_tex4ht " -cunihtf -e./custom_tex4ht.env -utf8" "-e./custom_tex4ht.env -d./html/"; \
|
70
|
34 rm ./html/*.css; \
|
|
35 )
|
72
|
36 # Postprocessing. Inject menu into output html pages. Replace some pieces, etc..
|
71
|
37 for f in "${VPATH}/html/"*.html; do \
|
|
38 sed -i '' '/^<body>/r manual_website_menu.html' "$$f"; \
|
72
|
39 sed -E -i '' $$'s/([[:space:]]class=["\'])lstlisting(["\'])/\\1ttDiv\\2/' "$$f"; \
|
71
|
40 done
|
70
|
41
|
72
|
42 manual.pdf: sources
|
|
43 # run twice for toc on some tex installs
|
|
44 cd "${VPATH}" && for i in 1 2; do pdflatex -output-directory="${PWD}" manual.tex; done
|
0
|
45
|