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