Re-create drill templates
[fw/altos] / doc / Makefile
1 #
2 #       http://docbook.sourceforge.net/release/xsl/current/README
3 #
4
5 RELNOTES=\
6         release-notes-0.7.1.html \
7         release-notes-0.8.html \
8         release-notes-0.9.html \
9         release-notes-0.9.2.html \
10         release-notes-1.0.1.html \
11         release-notes-1.1.html \
12         release-notes-1.1.1.html \
13         release-notes-1.2.html \
14         release-notes-1.2.1.html \
15         release-notes-1.3.html \
16         release-notes-1.3.1.html \
17         release-notes-1.3.2.html
18
19 PICTURES=\
20         altosui.png \
21         ascent.png \
22         configure-altimeter.png \
23         configure-altosui.png \
24         configure-groundstation.png \
25         configure-pyro.png \
26         descent.png \
27         device-selection.png \
28         easymini-top.jpg \
29         fire-igniter.png \
30         graph-configure.png \
31         graph-map.png \
32         graph.png \
33         graph-stats.png \
34         landed.png \
35         launch-pad.png \
36         load-maps.png \
37         micropeak-app.png \
38         micropeak-back.jpg \
39         micropeak-device-dialog.png \
40         micropeak-dime.jpg \
41         micropeak-download.png \
42         micropeak-graph-configure.png \
43         micropeak-graph.png \
44         micropeak-preferences.png \
45         micropeak-raw-data.png \
46         micropeak-save-dialog.png \
47         micropeak-statistics.png \
48         MicroPeakUSB-2.0-inuse.jpg \
49         MicroPeakUSB-2.0.jpg \
50         scan-channels.png \
51         site-map.png \
52         table.png \
53         telemega-v1.0-top.jpg \
54         telemetrum-v1.1-thside.jpg \
55         telemini-v1-top.jpg \
56         telemini-v2-top.jpg
57
58 SVG=\
59         easymini.svg \
60         telemega.svg \
61         telemetrum.svg \
62         telemini.svg
63
64 RELNOTES_XSL=$(RELNOTES:.html=.xsl)
65 HTML=altusmetrum.html altos.html telemetry.html companion.html micropeak.html $(RELNOTES)
66 PDF=altusmetrum.pdf altos.pdf telemetry.pdf companion.pdf micropeak.pdf
67 HTMLSTYLE=/usr/share/xml/docbook/stylesheet/docbook-xsl/html/docbook.xsl
68 FOSTYLE=xorg-fo.xsl
69 TEMPLATES=titlepage.templates.xsl
70 PDFSTYLE=
71 IMAGES=$(PICTURES) $(SVG)
72 DOC=$(HTML) $(PDF) $(PICTURES)
73
74 .SUFFIXES: .xml .xsl .html .pdf
75
76 XSLTFLAGS=--stringparam section.autolabel 1 --xinclude
77
78 .xsl.html:
79         xsltproc $(XSLTFLAGS) -o $@ $(HTMLSTYLE) $*.xsl
80
81 .xsl.pdf:
82         xmlto -x $(FOSTYLE) --with-fop pdf $*.xsl
83
84 .xml.xsl:
85         xsltproc --output $@ /usr/share/xml/docbook/stylesheet/docbook-xsl/template/titlepage.xsl $*.xml
86
87 all:    $(HTML) $(PDF)
88
89 install:        all
90
91 publish:        $(DOC)
92         cp $(DOC) /home/bdale/web/altusmetrum/AltOS/doc/
93         (cd /home/bdale/web/altusmetrum ; \
94          git add /home/bdale/web/altusmetrum/AltOS/doc/* ; \
95          echo "update docs" | \
96          git commit -F - /home/bdale/web/altusmetrum/AltOS/doc/* ; \
97          git push)
98
99 clean:
100         rm -f $(HTML) $(PDF) $(TEMPLATES)
101
102 distclean:
103         rm -f $(HTML) $(PDF)
104
105 altusmetrum.html: $(RELNOTES_XSL) $(IMAGES)
106 altusmetrum.pdf: $(RELNOTES_XSL) $(IMAGES)
107
108 $(PDF): $(FOSTYLE) $(TEMPLATES)
109
110 indent:         altusmetrum.xsl
111         xmlindent -i 2 < altusmetrum.xsl > altusmetrum.new
112