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