doc: Force FOP to read images from doc directory
[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         release-notes-1.4.html \
19         release-notes-1.4.1.html \
20         release-notes-1.5.html \
21         release-notes-1.6.html \
22         release-notes-1.6.1.html
23
24 PICTURES=\
25         altosui.png \
26         ascent.png \
27         configure-altimeter.png \
28         configure-altosui.png \
29         configure-groundstation.png \
30         configure-pyro.png \
31         descent.png \
32         device-selection.png \
33         easymini-top.jpg \
34         fire-igniter.png \
35         graph-configure.png \
36         graph-map.png \
37         graph.png \
38         graph-stats.png \
39         landed.png \
40         launch-pad.png \
41         load-maps.png \
42         micropeak-app.png \
43         micropeak-back.jpg \
44         micropeak-device-dialog.png \
45         micropeak-dime.jpg \
46         micropeak-download.png \
47         micropeak-graph-configure.png \
48         micropeak-graph.png \
49         micropeak-preferences.png \
50         micropeak-raw-data.png \
51         micropeak-save-dialog.png \
52         micropeak-statistics.png \
53         MicroPeakUSB-2.0-inuse.jpg \
54         MicroPeakUSB-2.0.jpg \
55         monitor-idle.png \
56         scan-channels.png \
57         site-map.png \
58         table.png \
59         telemega-v1.0-top.jpg \
60         telemetrum-v1.1-thside.jpg \
61         telemini-v1-top.jpg \
62         telemini-v2-top.jpg
63
64 SVG=\
65         easymini.svg \
66         telemega.svg \
67         telemetrum.svg \
68         telemini.svg \
69         easymega.svg
70
71 RELNOTES_XSL=$(RELNOTES:.html=.xsl)
72 HTML=altusmetrum.html altos.html telemetry.html companion.html micropeak.html telegps.html $(RELNOTES)
73 PDF=altusmetrum.pdf altos.pdf telemetry.pdf companion.pdf micropeak.pdf telegps.pdf \
74         telemetrum-outline.pdf telemega-outline.pdf easymini-outline.pdf easymega-outline.pdf
75 HTMLSTYLE=/usr/share/xml/docbook/stylesheet/docbook-xsl/html/docbook.xsl
76 FOSTYLE=xorg-fo.xsl
77 FOPCFG=fop-cfg.xml
78 TEMPLATES=titlepage.templates.xsl
79 PDFSTYLE=
80 IMAGES=$(PICTURES) $(SVG)
81 DOC=$(HTML) $(PDF) $(IMAGES)
82
83 .SUFFIXES: .xml .xsl .html .pdf
84
85 XSLTFLAGS=--stringparam section.autolabel 1 --xinclude
86
87 .xsl.html:
88         xsltproc $(XSLTFLAGS) -o $@ $(HTMLSTYLE) $*.xsl
89
90 .xsl.pdf:
91         xmlto -p '-c $(FOPCFG)' --searchpath `pwd` -x $(FOSTYLE) --with-fop pdf $*.xsl
92
93 .xml.xsl:
94         xsltproc --output $@ /usr/share/xml/docbook/stylesheet/docbook-xsl/template/titlepage.xsl $*.xml
95
96 all:    $(HTML) $(PDF)
97
98 install:        all
99
100 publish:        $(DOC)
101         cp $(DOC) /home/bdale/web/altusmetrum/AltOS/doc/
102         (cd /home/bdale/web/altusmetrum ; \
103          git add /home/bdale/web/altusmetrum/AltOS/doc/* ; \
104          echo "update docs" | \
105          git commit -F - /home/bdale/web/altusmetrum/AltOS/doc/* ; \
106          git push)
107
108 clean:
109         rm -f $(HTML) $(PDF) $(TEMPLATES)
110
111 distclean:
112         rm -f $(HTML) $(PDF)
113
114 altusmetrum.html: $(RELNOTES_XSL) $(IMAGES)
115 altusmetrum.pdf: $(RELNOTES_XSL) $(IMAGES)
116
117 telegps.html: $(RELNOTES_XSL) $(IMAGES)
118 telegps.pdf: $(RELNOTES_XSL) $(IMAGES)
119
120 $(PDF): $(FOSTYLE) $(TEMPLATES) $(FOPCFG)
121
122 indent:         altusmetrum.xsl
123         xmlindent -i 2 < altusmetrum.xsl > altusmetrum.new
124
125 $(FOPCFG): Makefile
126         (echo '<fop version="1.0">'; echo '  <base>'"`pwd`"'</base>'; echo '</fop>') > $@
127