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