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