doc: Add 1.9.16 release notes
[fw/altos] / doc / Makefile.am
1 #
2 # Copyright © 2018 Keith Packard <keithp@keithp.com>
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 2 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # General Public License for more details.
13 #
14
15 if FAKETIME
16 FAKETIME=TZ=UTC faketime -f '$(RELEASE_DATE) 00:00:00 i0'
17 endif
18
19 RELNOTES_INC=\
20         release-notes-1.9.16.inc \
21         release-notes-1.9.15.inc \
22         release-notes-1.9.14.inc \
23         release-notes-1.9.13.inc \
24         release-notes-1.9.12.inc \
25         release-notes-1.9.11.inc \
26         release-notes-1.9.10.inc \
27         release-notes-1.9.9.inc \
28         release-notes-1.9.8.inc \
29         release-notes-1.9.7.inc \
30         release-notes-1.9.6.inc \
31         release-notes-1.9.5.inc \
32         release-notes-1.9.4.inc \
33         release-notes-1.9.3.inc \
34         release-notes-1.9.2.inc \
35         release-notes-1.9.1.inc \
36         release-notes-1.9.inc \
37         release-notes-1.8.7.inc \
38         release-notes-1.8.6.inc \
39         release-notes-1.8.5.inc \
40         release-notes-1.8.4.inc \
41         release-notes-1.8.3.inc \
42         release-notes-1.8.2.inc \
43         release-notes-1.8.1.inc \
44         release-notes-1.8.inc \
45         release-notes-1.7.inc \
46         release-notes-1.6.8.inc \
47         release-notes-1.6.5.inc \
48         release-notes-1.6.4.inc \
49         release-notes-1.6.3.inc \
50         release-notes-1.6.2.inc \
51         release-notes-1.6.1.inc \
52         release-notes-1.6.inc \
53         release-notes-1.5.inc \
54         release-notes-1.4.2.inc \
55         release-notes-1.4.1.inc \
56         release-notes-1.4.inc \
57         release-notes-1.3.2.inc \
58         release-notes-1.3.1.inc \
59         release-notes-1.3.inc \
60         release-notes-1.2.1.inc \
61         release-notes-1.2.inc \
62         release-notes-1.1.1.inc \
63         release-notes-1.1.inc \
64         release-notes-1.0.1.inc \
65         release-notes-0.9.2.inc \
66         release-notes-0.9.inc \
67         release-notes-0.8.inc \
68         release-notes-0.7.1.inc
69
70 IMAGES=\
71         altosui.png \
72         ascent.png \
73         configure-altimeter.png \
74         configure-altosui.png \
75         configure-groundstation.png \
76         configure-pyro.png \
77         descent.png \
78         device-selection.png \
79         easymega.svg \
80         easymega-v1.0-bottom.jpg \
81         easymega-v1.0-top.jpg \
82         easymini.svg \
83         easymini-top.jpg \
84         easytimer.jpg \
85         fire-igniter.png \
86         graph-configure.png \
87         graph-map.png \
88         graph.png \
89         graph-stats.png \
90         ignitor.png \
91         landed.png \
92         launch-pad.png \
93         load-maps.png \
94         micropeak-app.png \
95         micropeak-back.jpg \
96         micropeak-device-dialog.png \
97         micropeak-dime.jpg \
98         micropeak-download.png \
99         micropeak-graph-configure.png \
100         micropeak-graph.png \
101         micropeak-nofont.svg \
102         micropeak-preferences.png \
103         micropeak-raw-data.png \
104         micropeak-save-dialog.png \
105         micropeak-statistics.png \
106         MicroPeakUSB-2.0-inuse.jpg \
107         MicroPeakUSB-2.0.jpg \
108         monitor-idle.png \
109         scan-channels.png \
110         site-map.png \
111         table.png \
112         telegps-configure.png \
113         telegps-graph-configure.png \
114         telegps-graph-graph.png \
115         telegps-graph-map.png \
116         telegps-graph-stats.png \
117         telegps-info.png \
118         telegps-location.png \
119         telegps-map.png \
120         telegps-preferences.png \
121         telegps-scan.png \
122         telegps-status.png \
123         telegps-table.png \
124         telegps-v1.0-top.jpg \
125         telemega.svg \
126         telemega-v1.0-top.jpg \
127         telemetrum.svg \
128         telemetrum-v1.1-thside.jpg \
129         telemetrum-v2.0-th.jpg \
130         telemini-v1.svg \
131         telemini-v1-top.jpg \
132         telemini-v3.svg \
133         telemini-v3.0-top.jpg \
134         telemini-v3.0-bottom.jpg \
135         altusmetrum-oneline.svg \
136         telegps-oneline.svg \
137         micropeak-oneline.svg
138
139 TXT_FILES=altusmetrum.txt
140
141 COMMON_INC_FILES=\
142         config-device.inc \
143         config-ui.inc \
144         load-maps.inc \
145         aprs-operation.inc \
146         pyro-examples.inc \
147         handling.inc \
148         release-head.inc
149
150 INC_FILES=\
151         header.inc \
152         dedication.inc \
153         intro.inc \
154         getting-started.inc \
155         usage.inc \
156         telemetrum.inc \
157         telemini.inc \
158         easymini-device.inc \
159         telemega.inc \
160         easymega.inc \
161         easytimer.inc \
162         installation.inc \
163         using-am-products.inc \
164         updating-firmware.inc \
165         frequency-cal.inc \
166         altosui.inc \
167         altosdroid.inc \
168         system-operation.inc \
169         pyro-channels.inc \
170         flight-data-recording.inc \
171         specs.inc \
172         $(COMMON_INC_FILES) \
173         release-notes.inc \
174         $(RELNOTES_INC)
175
176 ADOC_FILES=$(TXT_FILES:.txt=.adoc) $(INC_FILES:.inc=.adoc)
177
178 MOTORTEST_TXT_FILES=motortest.txt
179
180 MOTORTEST_INC_FILES=\
181         motortest-configuration.inc \
182         motortest-installation.inc \
183         motortest-intro.inc \
184         motortest-operation.inc
185
186 MOTORTEST_ADOC_FILES=$(MOTORTEST_TXT_FILES:.txt=.adoc) $(MOTORTEST_INC_FILES:.inc=.adoc)
187
188 TELELAUNCH_TXT_FILES=telelaunch.txt
189
190 TELELAUNCH_INC_FILES=\
191         header.inc \
192         telelaunch-acknowledgements.inc \
193         telelaunch-intro.inc \
194         telelaunch-configuration.inc \
195         telelaunch-operation.inc \
196         telelaunch-specs.inc \
197         telelaunch-updating-firmware.inc \
198         telelaunch-cables.inc \
199         telelaunch-troubleshooting.inc 
200
201 TELELAUNCH_ADOC_FILES=$(TELELAUNCH_TXT_FILES:.txt=.adoc) $(TELELAUNCH_INC_FILES:.inc=.adoc)
202
203 TELEGPS_INC_FILES=\
204         telegps-dedication.inc \
205         telegps-quick-start.inc \
206         telegps-using.inc \
207         telegps-system-operation.inc \
208         telegps-application.inc \
209         telegps-specs.inc \
210         telegps-updating-firmware.inc \
211         telegps-release-notes.inc \
212         $(COMMON_INC_FILES)
213
214 TELEGPS_TXT_FILES=\
215         telegps.txt
216
217 TELEGPS_ADOC_FILES=$(TELEGPS_TXT_FILES:.txt=.adoc) $(TELEGPS_INC_FILES:.inc=.adoc)
218
219 MICROPEAK_TXT_FILES=\
220         micropeak.txt
221
222 MICROPEAK_INC_FILES=
223
224 MICROPEAK_ADOC_FILES=$(MICROPEAK_TXT_FILES:.txt=.adoc) $(MICROPEAK_INC_FILES:.inc=.adoc)
225
226 EASYMINI_TXT_FILES=\
227         easymini.txt
228
229 EASYMINI_INC_FILES=$(INC_FILES) easymini-release-notes.inc
230
231
232 EASYMINI_ADOC_FILES=$(EASYMINI_TXT_FILES:.txt=.adoc) $(EASYMINI_INC_FILES:.inc=.adoc)
233
234 OUTLINE_TXT_FILES=\
235         easymega-outline.txt \
236         easymini-outline.txt \
237         telemega-outline.txt \
238         telemetrum-outline.txt \
239         telemini-v1-outline.txt \
240         telemini-v3-outline.txt \
241         telegps-outline.txt
242
243 OUTLINE_ADOC_FILES=$(OUTLINE_TXT_FILES:.txt=.adoc)
244
245 OUTLINE_PDF_FILES=$(OUTLINE_TXT_FILES:.txt=.pdf)
246
247 SVG=\
248         easymini.svg \
249         telemega.svg \
250         telemetrum.svg \
251         telemini-v1.svg \
252         telemini-v3.svg \
253         easymega.svg
254
255 RELNOTES_HTML=$(RELNOTES_INC:.inc=.html)
256
257 ONEFILE_TXT_FILES=\
258         altos.txt \
259         companion.txt \
260         telemetry.txt \
261         map-loading.txt
262
263 ONEFILE_ADOC_FILES=$(ONEFILE_TXT_FILES:.txt=.adoc)
264 ONEFILE_PDF_FILES=$(ONEFILE_TXT_FILES:.txt=.pdf)
265 ONEFILE_HTML_FILES=$(ONEFILE_TXT_FILES:.txt=.html)
266
267 AM_HTML=am.html
268
269 PUBLISH_HTML=altusmetrum.html micropeak.html telegps.html easymini.html motortest.html telelaunch.html $(ONEFILE_HTML_FILES)
270
271 HTML=$(PUBLISH_HTML) $(RELNOTES_HTML)
272
273 if ASCIIDOCTOR_PDF
274 PDF=altusmetrum.pdf micropeak.pdf telegps.pdf easymini.pdf motortest.pdf telelaunch.pdf $(ONEFILE_PDF_FILES) \
275         $(OUTLINE_PDF_FILES)
276 endif
277
278 MAP_DOT_FILES=map-loading.dot
279 MAP_SVG_FILES=$(MAP_DOT_FILES:.dot=.svg)
280 STYLESHEET=am.css am-notoc.css
281
282 FONTS=\
283         fonts/DejaVuSansMono-BoldOblique.ttf \
284         fonts/DejaVuSansMono-Bold.ttf \
285         fonts/DejaVuSansMono-Oblique.ttf \
286         fonts/DejaVuSansMono.ttf \
287         fonts/OpenSans-Light.ttf \
288         fonts/OpenSans-LightItalic.ttf \
289         fonts/OpenSans-Regular.ttf \
290         fonts/OpenSans-Italic.ttf \
291         fonts/OpenSans-Semibold.ttf \
292         fonts/OpenSans-SemiboldItalic.ttf
293
294 ICONS=\
295         images/icons/caution.svg \
296         images/icons/important.svg \
297         images/icons/note.svg \
298         images/icons/tip.svg \
299         images/icons/warning.svg
300
301 PDF_CONFIG_FILES=altusmetrum-theme.yml
302 HTML_CONFIG_FILES=
303
304 PUBLISH_DOC=$(PUBLISH_HTML) $(PDF) $(IMAGES) $(MAP_SVG_FILES) $(STYLESHEET)
305
306 DOC=$(HTML) $(PDF) $(IMAGES) $(MAP_SVG_FILES) $(STYLESHEET)
307
308 SUFFIXES = .dot .svg .inc .txt .adoc .pdf .html
309
310 ATTRIBUTES=--attribute="revdate=$(DOC_DATE)" --attribute="version=$(VERSION)"
311
312 .dot.svg:
313         dot -Tsvg -o$@ $*.dot
314
315 .txt.adoc:
316         sed -e 's/^[    ]*//' -e 's/^\\//' $*.txt > $@
317
318 .inc.adoc:
319         sed -e 's/^[    ]*//' -e 's/^\\//' $*.inc > $@
320
321 .adoc.html:
322         asciidoctor $(ATTRIBUTES) -b html5 $*.adoc
323
324 .adoc.pdf:
325         asciidoctor-pdf $(ATTRIBUTES) $*.adoc
326
327 all:    $(HTML) $(PDF)
328
329 map-loading.adoc: $(MAP_SVG_FILES)
330
331 altusmetrum.pdf altusmetrum.html: $(ADOC_FILES) $(IMAGES)
332
333 motortest.pdf motortest.html: $(MOTORTEST_ADOC_FILES) $(IMAGES)
334
335 telelaunch.pdf telelaunch.html: $(TELELAUNCH_ADOC_FILES) $(IMAGES)
336
337 telegps.html telegps.pdf: $(TELEGPS_ADOC_FILES) $(IMAGES)
338
339 micropeak.pdf micropeak.html: $(MICROPEAK_ADOC_FILES) $(IMAGES)
340
341 easymini.pdf easymini.html: $(EASYMINI_ADOC_FILES) $(IMAGES)
342
343 telemini-v1-outline.pdf: telemini-v1-outline.txt telemini-v1.svg
344
345 telemini-v3-outline.pdf: telemini-v3-outline.txt telemini-v3.svg
346
347 install:        all
348
349 WEB_ROOT=/home/bdale/web/
350
351 publish:        $(PUBLISH_DOC) $(FONTS) $(ICONS)
352         cp -a $(PUBLISH_DOC) $(WEB_ROOT)/altusmetrum/AltOS/doc/
353         mkdir -p $(WEB_ROOT)/altusmetrum/AltOS/doc/fonts/
354         cp $(FONTS) $(WEB_ROOT)/altusmetrum/AltOS/doc/fonts/
355         mkdir -p $(WEB_ROOT)/altusmetrum/AltOS/doc/images/icons/
356         cp $(ICONS) $(WEB_ROOT)/altusmetrum/AltOS/doc/images/icons/
357         (cd $(WEB_ROOT)/altusmetrum ; \
358          git add $(WEB_ROOT)/altusmetrum/AltOS/doc/* ; \
359          git add $(WEB_ROOT)/altusmetrum/AltOS/doc/fonts/* ; \
360          git add $(WEB_ROOT)/altusmetrum/AltOS/doc/images/icons/* ;\
361          echo "update docs" | \
362          git commit -F - $(WEB_ROOT)/altusmetrum/AltOS/doc/* $(WEB_ROOT)/altusmetrum/AltOS/doc/fonts/* $(WEB_ROOT)/altusmetrum/AltOS/doc/images/icons ; \
363          git push)
364
365 publish-keithp: am.html $(DOC) $(FONTS)
366         ssh keithp.com 'mkdir -p ~keithp/public_html/altos/fonts ~keithp/public_html/altos/images/icons'
367         scp -p am.html $(DOC) keithp.com:~keithp/public_html/altos
368         scp -p $(FONTS) keithp.com:~keithp/public_html/altos/fonts
369         scp -p $(ICONS) keithp.com:~keithp/public_html/altos/images/icons
370
371 clean:
372         rm -f am.html $(HTML) $(PDF) $(ADOC_FILES) $(TELEGPS_ADOC_FILES) $(MICROPEAK_ADOC_FILES) $(TELELAUNCH_ADOC_FILES) $(MOTORTEST_ADOC_FILES)
373
374 distclean: clean
375         rm -f $(HTML) $(PDF)
376
377 $(PDF): $(PDF_CONFIG_FILES)
378 $(HTML): $(HTML_CONFIG_FILES)
379
380 am.html: Makefile make-am-html $(HTML)
381         sh ./make-am-html $(HTML) > $@