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