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