annotate doc/manual/Makefile.generic @ 72:2b89d8497aad

- html manual work
author cslag
date Sun, 13 Mar 2016 21:08:59 +0100
parents edc2afc17aa0
children a59ae4370202
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
1 all: manual.pdf
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
2
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
3 sources: *.tex callconvs/*.tex dyncall_logo.* dyncall_watermark.*
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
4
72
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
5 pdf: manual.pdf
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
6
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
7 html:: html/manual.html
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
8 #html-single: html/manual.html
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
9 #html-split: html/manual.html
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
10
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
11 clean:
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
12 # pdf
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
13 cd "${VPATH}" && for i in pdf aux lof log lol lot out toc; do rm -f manual.$$i || true; done
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
14 # html
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
15 cd "${VPATH}" && ( \
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
16 for i in 4ct 4tc css dvi html idv lg tmp xref; do rm -f manual.$$i || true; done; \
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
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; \
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
18 rm -r html || true; \
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
19 )
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
20
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
21
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
22 # Main target dependencies --->
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
23
71
edc2afc17aa0 - more html doc work
cslag
parents: 70
diff changeset
24 manual_website_menu.html:
edc2afc17aa0 - more html doc work
cslag
parents: 70
diff changeset
25 curl -s http://www.dyncall.org | sed '/<body>/,/<div class="mainDiv">/p;d' | sed 's/^.*<body>//;s/<div class="mainDiv">.*$$//' > $@
edc2afc17aa0 - more html doc work
cslag
parents: 70
diff changeset
26
edc2afc17aa0 - more html doc work
cslag
parents: 70
diff changeset
27 html/manual.html: manual_tex4ht.cfg manual_website_menu.html sources
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
28 # Create tex4ht.env from default one, but with better bitmaps
70
33c333ec5ad2 - progress on html doc generation
cslag
parents: 0
diff changeset
29 cd "${VPATH}" && ( \
33c333ec5ad2 - progress on html doc generation
cslag
parents: 0
diff changeset
30 cp $$(dirname $$(which tex4ht))/../share/texmf-dist/tex4ht/base/unix/tex4ht.env ./custom_tex4ht.env; \
33c333ec5ad2 - progress on html doc generation
cslag
parents: 0
diff changeset
31 sed -E -i '' 's/(Text|Graphics)(AlphaBits)=[1,2,3]([^0-9])/\1\2=4\3/g' custom_tex4ht.env; \
33c333ec5ad2 - progress on html doc generation
cslag
parents: 0
diff changeset
32 mkdir -p ./html/; \
72
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
33 htlatex manual.tex manual_tex4ht " -cunihtf -e./custom_tex4ht.env -utf8" "-e./custom_tex4ht.env -d./html/"; \
70
33c333ec5ad2 - progress on html doc generation
cslag
parents: 0
diff changeset
34 rm ./html/*.css; \
33c333ec5ad2 - progress on html doc generation
cslag
parents: 0
diff changeset
35 )
72
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
36 # Postprocessing. Inject menu into output html pages. Replace some pieces, etc..
71
edc2afc17aa0 - more html doc work
cslag
parents: 70
diff changeset
37 for f in "${VPATH}/html/"*.html; do \
edc2afc17aa0 - more html doc work
cslag
parents: 70
diff changeset
38 sed -i '' '/^<body>/r manual_website_menu.html' "$$f"; \
72
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
39 sed -E -i '' $$'s/([[:space:]]class=["\'])lstlisting(["\'])/\\1ttDiv\\2/' "$$f"; \
71
edc2afc17aa0 - more html doc work
cslag
parents: 70
diff changeset
40 done
70
33c333ec5ad2 - progress on html doc generation
cslag
parents: 0
diff changeset
41
72
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
42 manual.pdf: sources
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
43 # run twice for toc on some tex installs
2b89d8497aad - html manual work
cslag
parents: 71
diff changeset
44 cd "${VPATH}" && for i in 1 2; do pdflatex -output-directory="${PWD}" manual.tex; done
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
45