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