83731fbe8f1998378f96c53472da2a76e3e8870c
[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         scan-channels.png \
38         site-map.png \
39         table.png \
40         telemega-v1.0-top.jpg \
41         telemetrum-v1.1-thside.jpg \
42         telemini-v1-top.jpg \
43         telemini-v2-top.jpg
44 SVG=\
45         easymini-outline.svg \
46         telemega-outline.svg \
47         telemetrum.svg \
48         telemini.svg
49
50 RELNOTES_XSL=$(RELNOTES:.html=.xsl)
51 HTML=altusmetrum.html altos.html telemetry.html companion.html micropeak.html $(RELNOTES)
52 PDF=altusmetrum.pdf altos.pdf telemetry.pdf companion.pdf micropeak.pdf
53 HTMLSTYLE=/usr/share/xml/docbook/stylesheet/docbook-xsl/html/docbook.xsl
54 FOSTYLE=xorg-fo.xsl
55 TEMPLATES=titlepage.templates.xsl
56 PDFSTYLE=
57 IMAGES=$(PICTURES) $(SVG)
58 DOC=$(HTML) $(PDF) $(PICTURES)
59
60 .SUFFIXES: .xml .xsl .html .pdf
61
62 XSLTFLAGS=--stringparam section.autolabel 1 --xinclude
63
64 .xsl.html:
65         xsltproc $(XSLTFLAGS) -o $@ $(HTMLSTYLE) $*.xsl
66
67 .xsl.pdf:
68         xmlto -x $(FOSTYLE) --with-fop pdf $*.xsl
69
70 .xml.xsl:
71         xsltproc --output $@ /usr/share/xml/docbook/stylesheet/docbook-xsl/template/titlepage.xsl $*.xml
72
73 all:    $(HTML) $(PDF)
74
75 install:        all
76
77 publish:        $(DOC)
78         cp $(DOC) /home/bdale/web/altusmetrum/AltOS/doc/
79         (cd /home/bdale/web/altusmetrum ; \
80          git add /home/bdale/web/altusmetrum/AltOS/doc/* ; \
81          echo "update docs" | \
82          git commit -F - /home/bdale/web/altusmetrum/AltOS/doc/* ; \
83          git push)
84
85 clean:
86         rm -f $(HTML) $(PDF) $(TEMPLATES)
87
88 distclean:
89         rm -f $(HTML) $(PDF)
90
91 altusmetrum.html: $(RELNOTES_XSL) $(IMAGES)
92 altusmetrum.pdf: $(RELNOTES_XSL) $(IMAGES)
93
94 $(PDF): $(FOSTYLE) $(TEMPLATES)
95
96 indent:         altusmetrum.xsl
97         xmlindent -i 2 < altusmetrum.xsl > altusmetrum.new
98