707a4428ad527c578dd66d956b7c457cb44f30d0
[fw/altos] / doc / Makefile
1 #
2 #       http://docbook.sourceforge.net/release/xsl/current/README
3 #
4
5 RELNOTES_INC=\
6         release-notes-1.6.5.inc \
7         release-notes-1.6.4.inc \
8         release-notes-1.6.3.inc \
9         release-notes-1.6.2.inc \
10         release-notes-1.6.1.inc \
11         release-notes-1.6.inc \
12         release-notes-1.5.inc \
13         release-notes-1.4.2.inc \
14         release-notes-1.4.1.inc \
15         release-notes-1.4.inc \
16         release-notes-1.3.2.inc \
17         release-notes-1.3.1.inc \
18         release-notes-1.3.inc \
19         release-notes-1.2.1.inc \
20         release-notes-1.2.inc \
21         release-notes-1.1.1.inc \
22         release-notes-1.1.inc \
23         release-notes-1.0.1.inc \
24         release-notes-0.9.2.inc \
25         release-notes-0.9.inc \
26         release-notes-0.8.inc \
27         release-notes-0.7.1.inc
28
29 IMAGES=\
30         altosui.png \
31         ascent.png \
32         configure-altimeter.png \
33         configure-altosui.png \
34         configure-groundstation.png \
35         configure-pyro.png \
36         descent.png \
37         device-selection.png \
38         easymega.svg \
39         easymega-v1.0-bottom.jpg \
40         easymega-v1.0-top.jpg \
41         easymini.svg \
42         easymini-top.jpg \
43         fire-igniter.png \
44         graph-configure.png \
45         graph-map.png \
46         graph.png \
47         graph-stats.png \
48         ignitor.png \
49         landed.png \
50         launch-pad.png \
51         load-maps.png \
52         micropeak-app.png \
53         micropeak-back.jpg \
54         micropeak-device-dialog.png \
55         micropeak-dime.jpg \
56         micropeak-download.png \
57         micropeak-graph-configure.png \
58         micropeak-graph.png \
59         micropeak-nofont.svg \
60         micropeak-preferences.png \
61         micropeak-raw-data.png \
62         micropeak-save-dialog.png \
63         micropeak-statistics.png \
64         MicroPeakUSB-2.0-inuse.jpg \
65         MicroPeakUSB-2.0.jpg \
66         monitor-idle.png \
67         scan-channels.png \
68         site-map.png \
69         table.png \
70         telegps-configure.png \
71         telegps-graph-configure.png \
72         telegps-graph-graph.png \
73         telegps-graph-map.png \
74         telegps-graph-stats.png \
75         telegps-info.png \
76         telegps-location.png \
77         telegps-map.png \
78         telegps-preferences.png \
79         telegps-scan.png \
80         telegps-status.png \
81         telegps-table.png \
82         telegps-v1.0-top.jpg \
83         telemega.svg \
84         telemega-v1.0-top.jpg \
85         telemetrum.svg \
86         telemetrum-v1.1-thside.jpg \
87         telemetrum-v2.0-th.jpg \
88         telemini.svg \
89         telemini-v1-top.jpg \
90         altusmetrum-oneline.svg \
91         telegps-oneline.svg \
92         micropeak-oneline.svg
93
94 TXT_FILES=altusmetrum.txt
95
96 COMMON_INC_FILES=\
97         config-device.inc \
98         config-ui.inc \
99         load-maps.inc \
100         aprs-operation.inc \
101         handling.inc
102
103 INC_FILES=\
104         dedication.inc \
105         intro.inc \
106         getting-started.inc \
107         usage.inc \
108         telemetrum.inc \
109         telemini-v1.0.inc \
110         easymini-device.inc \
111         telemega.inc \
112         easymega.inc \
113         installation.inc \
114         using-am-products.inc \
115         updating-firmware.inc \
116         altosui.inc \
117         altosdroid.inc \
118         system-operation.inc \
119         pyro-channels.inc \
120         flight-data-recording.inc \
121         specs.inc \
122         $(COMMON_INC_FILES) \
123         release-notes.inc \
124         $(RELNOTES_INC)
125
126 RAW_FILES=$(TXT_FILES:.txt=.raw) $(INC_FILES:.inc=.raw)
127
128 TELEGPS_INC_FILES=\
129         telegps-dedication.inc \
130         telegps-quick-start.inc \
131         telegps-using.inc \
132         telegps-system-operation.inc \
133         telegps-application.inc \
134         telegps-specs.inc \
135         telegps-updating-firmware.inc \
136         telegps-release-notes.inc \
137         $(COMMON_INC_FILES)
138
139 TELEGPS_TXT_FILES=\
140         telegps.txt
141
142 TELEGPS_RAW_FILES=$(TELEGPS_TXT_FILES:.txt=.raw) $(TELEGPS_INC_FILES:.inc=.raw)
143
144 MICROPEAK_TXT_FILES=\
145         micropeak.txt
146
147 MICROPEAK_INC_FILES=
148
149 MICROPEAK_RAW_FILES=$(MICROPEAK_TXT_FILES:.txt=.raw) $(MICROPEAK_INC_FILES:.inc=.raw)
150
151 EASYMINI_TXT_FILES=\
152         easymini.txt
153
154 EASYMINI_INC_FILES=$(INC_FILES) easymini-release-notes.inc
155
156
157 EASYMINI_RAW_FILES=$(EASYMINI_TXT_FILES:.txt=.raw) $(EASYMINI_INC_FILES:.inc=.raw)
158
159 OUTLINE_TXT_FILES=\
160         easymega-outline.txt \
161         easymini-outline.txt \
162         telemega-outline.txt \
163         telemetrum-outline.txt \
164         telemini-outline.txt
165
166 OUTLINE_RAW_FILES=$(OUTLINE_TXT_FILES:.txt=.raw)
167
168 OUTLINE_PDF_FILES=$(OUTLINE_TXT_FILES:.txt=.pdf)
169
170 SVG=\
171         easymini.svg \
172         telemega.svg \
173         telemetrum.svg \
174         telemini.svg \
175         easymega.svg
176
177 RELNOTES_PDF=$(RELNOTES_INC:.inc=.pdf)
178 RELNOTES_HTML=$(RELNOTES_INC:.inc=.html)
179
180 ONEFILE_TXT_FILES=\
181         altos.txt \
182         companion.txt \
183         telemetry.txt
184
185 ONEFILE_RAW_FILES=$(ONEFILE_TXT_FILES:.txt=.raw)
186 ONEFILE_PDF_FILES=$(ONEFILE_TXT_FILES:.txt=.pdf)
187
188 AM_HTML=am.html
189
190 HTML=altusmetrum.html micropeak.html telegps.html easymini.html $(RELNOTES_HTML) $(ONEFILE_HTML_FILES)
191
192 HTML_REVHISTORY=\
193         altusmetrum-revhistory.html \
194         micropeak-revhistory.html \
195         telegps-revhistory.html \
196         easymini-revhistory.html
197
198 PDF=altusmetrum.pdf micropeak.pdf telegps.pdf easymini.pdf $(RELNOTES_PDF) $(ONEFILE_PDF_FILES) \
199         $(OUTLINE_PDF_FILES)
200
201 FOP_STYLE=am-fo.xsl
202 HTML_STYLE=am-html.xsl
203 COMMON_STYLE=common.xsl
204 FOP_XCONF=fop.xconf
205 STYLESHEET=am.css
206
207 FONTS=\
208         fonts/DejaVuSansMono-BoldOblique.ttf \
209         fonts/DejaVuSansMono-Bold.ttf \
210         fonts/DejaVuSansMono-Oblique.ttf \
211         fonts/DejaVuSansMono.ttf \
212         fonts/OpenSans-Light.ttf \
213         fonts/OpenSans-LightItalic.ttf \
214         fonts/OpenSans-Regular.ttf \
215         fonts/OpenSans-Italic.ttf \
216         fonts/OpenSans-Semibold.ttf \
217         fonts/OpenSans-SemiboldItalic.ttf
218
219 TEMPLATES_TMPL=titlepage.templates.tmpl
220
221 TEMPLATES_XSL=$(TEMPLATES_TMPL:.tmpl=.xsl)
222
223 PDF_CONFIG_FILES=$(FOP_STYLE) $(COMMON_STYLE) $(FOP_XCONF) $(TEMPLATES_XSL)
224 HTML_CONFIG_FILES=$(HTML_STYLE) $(COMMON_STYLE) $(TEMPLATES_XSL)
225
226 DOC=$(HTML) $(HTML_REVHISTORY) $(PDF) $(IMAGES) $(STYLESHEET)
227
228 .SUFFIXES: .tmpl .xsl .inc .txt .raw .pdf .html
229
230 .txt.raw:
231         sed -e 's/^[    ]*//' -e 's/^\\//' $*.txt > $@
232
233 .inc.raw:
234         sed -e 's/^[    ]*//' -e 's/^\\//' $*.inc > $@
235
236 .raw.pdf:
237         a2x --verbose -a docinfo -f pdf --xsltproc-opts "--stringparam toc.section.depth 2" --xsl-file $(FOP_STYLE) --fop --fop-opts="-c $(FOP_XCONF)" $*.raw
238         a2x --verbose -a docinfo -f xhtml --xsltproc-opts "--stringparam toc.section.depth 2" --xsl-file $(HTML_STYLE) --stylesheet=$(STYLESHEET) $*.raw
239
240 .pdf.html:
241         @touch $@
242
243 .tmpl.xsl:
244         xsltproc --output $@ /usr/share/xml/docbook/stylesheet/docbook-xsl/template/titlepage.xsl $*.tmpl
245
246 all:    $(HTML) $(PDF)
247
248 altusmetrum-revhistory.html: altusmetrum.html
249
250 micropeak-revhistory.html: micropeak.html
251
252 telegps-revhistory.html: telegps.html
253
254 altusmetrum.pdf altusmetrum.html: altusmetrum-docinfo.xml $(RAW_FILES) $(IMAGES)
255
256 telegps.html telegps.pdf: telegps-docinfo.xml $(TELEGPS_RAW_FILES) $(IMAGES)
257
258 micropeak.pdf micropeak.html: micropeak-docinfo.xml $(MICROPEAK_RAW_FILES) $(IMAGES)
259
260 easymini.pdf easymini.html: easymini-docinfo.xml $(EASYMINI_RAW_FILES) $(IMAGES)
261
262 install:        all
263
264 publish:        $(DOC) $(FONTS)
265         cp $(DOC) /home/bdale/web/altusmetrum/AltOS/doc/
266         mkdir -p /home/bdale/web/altusmetrum/AltOS/doc/fonts/
267         cp $(FONTS) /home/bdale/web/altusmetrum/AltOS/doc/fonts/
268         (cd /home/bdale/web/altusmetrum ; \
269          git add /home/bdale/web/altusmetrum/AltOS/doc/* ; \
270          git add /home/bdale/web/altusmetrum/AltOS/doc/fonts/* ; \
271          echo "update docs" | \
272          git commit -F - /home/bdale/web/altusmetrum/AltOS/doc/* /home/bdale/web/altusmetrum/AltOS/doc/fonts/* ; \
273          git push)
274
275 publish-keithp: am.html $(DOC) $(FONTS)
276         scp -p am.html $(DOC) keithp.com:~keithp/public_html/altos
277         scp -p $(FONTS) keithp.com:~keithp/public_html/altos/fonts
278
279 clean:
280         rm -f am.html $(HTML) $(HTML_REVHISTORY) $(PDF) $(TEMPLATES_XSL) $(RAW_FILES) $(TELEGPS_RAW_FILES) $(MICROPEAK_RAW_FILES)
281
282 distclean: clean
283         rm -f $(HTML) $(PDF)
284
285 $(PDF): $(PDF_CONFIG_FILES)
286 $(HTML): $(HTML_CONFIG_FILES)
287
288 am.html: Makefile make-am-html $(HTML)
289         sh ./make-am-html $(HTML) > $@