altosuilib: Provide dialog while waiting for flash target to re-appear
[fw/altos] / doc / Makefile
1 #
2 #       http://docbook.sourceforge.net/release/xsl/current/README
3 #
4
5 RELNOTES_INC=\
6         release-notes-1.8.6.inc \
7         release-notes-1.8.5.inc \
8         release-notes-1.8.4.inc \
9         release-notes-1.8.3.inc \
10         release-notes-1.8.2.inc \
11         release-notes-1.8.1.inc \
12         release-notes-1.8.inc \
13         release-notes-1.7.inc \
14         release-notes-1.6.8.inc \
15         release-notes-1.6.5.inc \
16         release-notes-1.6.4.inc \
17         release-notes-1.6.3.inc \
18         release-notes-1.6.2.inc \
19         release-notes-1.6.1.inc \
20         release-notes-1.6.inc \
21         release-notes-1.5.inc \
22         release-notes-1.4.2.inc \
23         release-notes-1.4.1.inc \
24         release-notes-1.4.inc \
25         release-notes-1.3.2.inc \
26         release-notes-1.3.1.inc \
27         release-notes-1.3.inc \
28         release-notes-1.2.1.inc \
29         release-notes-1.2.inc \
30         release-notes-1.1.1.inc \
31         release-notes-1.1.inc \
32         release-notes-1.0.1.inc \
33         release-notes-0.9.2.inc \
34         release-notes-0.9.inc \
35         release-notes-0.8.inc \
36         release-notes-0.7.1.inc
37
38 IMAGES=\
39         altosui.png \
40         ascent.png \
41         configure-altimeter.png \
42         configure-altosui.png \
43         configure-groundstation.png \
44         configure-pyro.png \
45         descent.png \
46         device-selection.png \
47         easymega.svg \
48         easymega-v1.0-bottom.jpg \
49         easymega-v1.0-top.jpg \
50         easymini.svg \
51         easymini-top.jpg \
52         fire-igniter.png \
53         graph-configure.png \
54         graph-map.png \
55         graph.png \
56         graph-stats.png \
57         ignitor.png \
58         landed.png \
59         launch-pad.png \
60         load-maps.png \
61         micropeak-app.png \
62         micropeak-back.jpg \
63         micropeak-device-dialog.png \
64         micropeak-dime.jpg \
65         micropeak-download.png \
66         micropeak-graph-configure.png \
67         micropeak-graph.png \
68         micropeak-nofont.svg \
69         micropeak-preferences.png \
70         micropeak-raw-data.png \
71         micropeak-save-dialog.png \
72         micropeak-statistics.png \
73         MicroPeakUSB-2.0-inuse.jpg \
74         MicroPeakUSB-2.0.jpg \
75         monitor-idle.png \
76         scan-channels.png \
77         site-map.png \
78         table.png \
79         telegps-configure.png \
80         telegps-graph-configure.png \
81         telegps-graph-graph.png \
82         telegps-graph-map.png \
83         telegps-graph-stats.png \
84         telegps-info.png \
85         telegps-location.png \
86         telegps-map.png \
87         telegps-preferences.png \
88         telegps-scan.png \
89         telegps-status.png \
90         telegps-table.png \
91         telegps-v1.0-top.jpg \
92         telemega.svg \
93         telemega-v1.0-top.jpg \
94         telemetrum.svg \
95         telemetrum-v1.1-thside.jpg \
96         telemetrum-v2.0-th.jpg \
97         telemini-v1.svg \
98         telemini-v1-top.jpg \
99         telemini-v3.svg \
100         telemini-v3.0-top.jpg \
101         telemini-v3.0-bottom.jpg \
102         altusmetrum-oneline.svg \
103         telegps-oneline.svg \
104         micropeak-oneline.svg
105
106 TXT_FILES=altusmetrum.txt
107
108 COMMON_INC_FILES=\
109         config-device.inc \
110         config-ui.inc \
111         load-maps.inc \
112         aprs-operation.inc \
113         handling.inc
114
115 INC_FILES=\
116         dedication.inc \
117         intro.inc \
118         getting-started.inc \
119         usage.inc \
120         telemetrum.inc \
121         telemini.inc \
122         easymini-device.inc \
123         telemega.inc \
124         easymega.inc \
125         installation.inc \
126         using-am-products.inc \
127         updating-firmware.inc \
128         altosui.inc \
129         altosdroid.inc \
130         system-operation.inc \
131         pyro-channels.inc \
132         flight-data-recording.inc \
133         specs.inc \
134         $(COMMON_INC_FILES) \
135         release-notes.inc \
136         $(RELNOTES_INC)
137
138 RAW_FILES=$(TXT_FILES:.txt=.raw) $(INC_FILES:.inc=.raw)
139
140 TELEGPS_INC_FILES=\
141         telegps-dedication.inc \
142         telegps-quick-start.inc \
143         telegps-using.inc \
144         telegps-system-operation.inc \
145         telegps-application.inc \
146         telegps-specs.inc \
147         telegps-updating-firmware.inc \
148         telegps-release-notes.inc \
149         $(COMMON_INC_FILES)
150
151 TELEGPS_TXT_FILES=\
152         telegps.txt
153
154 TELEGPS_RAW_FILES=$(TELEGPS_TXT_FILES:.txt=.raw) $(TELEGPS_INC_FILES:.inc=.raw)
155
156 MICROPEAK_TXT_FILES=\
157         micropeak.txt
158
159 MICROPEAK_INC_FILES=
160
161 MICROPEAK_RAW_FILES=$(MICROPEAK_TXT_FILES:.txt=.raw) $(MICROPEAK_INC_FILES:.inc=.raw)
162
163 EASYMINI_TXT_FILES=\
164         easymini.txt
165
166 EASYMINI_INC_FILES=$(INC_FILES) easymini-release-notes.inc
167
168
169 EASYMINI_RAW_FILES=$(EASYMINI_TXT_FILES:.txt=.raw) $(EASYMINI_INC_FILES:.inc=.raw)
170
171 OUTLINE_TXT_FILES=\
172         easymega-outline.txt \
173         easymini-outline.txt \
174         telemega-outline.txt \
175         telemetrum-outline.txt \
176         telemini-v1-outline.txt \
177         telemini-v3-outline.txt \
178         telegps-outline.txt
179
180 OUTLINE_RAW_FILES=$(OUTLINE_TXT_FILES:.txt=.raw)
181
182 OUTLINE_PDF_FILES=$(OUTLINE_TXT_FILES:.txt=.pdf)
183
184 SVG=\
185         easymini.svg \
186         telemega.svg \
187         telemetrum.svg \
188         telemini-v1.svg \
189         telemini-v3.svg \
190         easymega.svg
191
192 RELNOTES_HTML=$(RELNOTES_INC:.inc=.html)
193
194 ONEFILE_TXT_FILES=\
195         altos.txt \
196         companion.txt \
197         telemetry.txt
198
199 ONEFILE_RAW_FILES=$(ONEFILE_TXT_FILES:.txt=.raw)
200 ONEFILE_PDF_FILES=$(ONEFILE_TXT_FILES:.txt=.pdf)
201 ONEFILE_HTML_FILES=$(ONEFILE_TXT_FILES:.txt=.html)
202
203 AM_HTML=am.html
204
205 PUBLISH_HTML=altusmetrum.html micropeak.html telegps.html easymini.html $(ONEFILE_HTML_FILES)
206
207 HTML=$(PUBLISH_HTML) $(RELNOTES_HTML)
208
209 HTML_REVHISTORY=\
210         altusmetrum-revhistory.html \
211         micropeak-revhistory.html \
212         telegps-revhistory.html \
213         easymini-revhistory.html
214
215 PDF=altusmetrum.pdf micropeak.pdf telegps.pdf easymini.pdf $(ONEFILE_PDF_FILES) \
216         $(OUTLINE_PDF_FILES)
217
218 FOP_STYLE=am-fo.xsl
219 HTML_STYLE=am-html.xsl
220 COMMON_STYLE=common.xsl
221 FOP_XCONF=fop.xconf
222 STYLESHEET=am.css
223
224 FONTS=\
225         fonts/DejaVuSansMono-BoldOblique.ttf \
226         fonts/DejaVuSansMono-Bold.ttf \
227         fonts/DejaVuSansMono-Oblique.ttf \
228         fonts/DejaVuSansMono.ttf \
229         fonts/OpenSans-Light.ttf \
230         fonts/OpenSans-LightItalic.ttf \
231         fonts/OpenSans-Regular.ttf \
232         fonts/OpenSans-Italic.ttf \
233         fonts/OpenSans-Semibold.ttf \
234         fonts/OpenSans-SemiboldItalic.ttf
235
236 TEMPLATES_TMPL=titlepage.templates.tmpl
237
238 TEMPLATES_XSL=$(TEMPLATES_TMPL:.tmpl=.xsl)
239
240 PDF_CONFIG_FILES=$(FOP_STYLE) $(COMMON_STYLE) $(FOP_XCONF) $(TEMPLATES_XSL)
241 HTML_CONFIG_FILES=$(HTML_STYLE) $(COMMON_STYLE) $(TEMPLATES_XSL)
242
243 PUBLISH_DOC=$(PUBLISH_HTML) $(HTML_REVHISTORY) $(PDF) $(IMAGES) $(STYLESHEET)
244
245 DOC=$(HTML) $(HTML_REVHISTORY) $(PDF) $(IMAGES) $(STYLESHEET)
246
247 .SUFFIXES: .tmpl .xsl .inc .txt .raw .pdf .html
248
249 .txt.raw:
250         sed -e 's/^[    ]*//' -e 's/^\\//' $*.txt > $@
251
252 .inc.raw:
253         sed -e 's/^[    ]*//' -e 's/^\\//' $*.inc > $@
254
255 .raw.html:
256         a2x --verbose -a docinfo -f pdf --xsltproc-opts "--stringparam toc.section.depth 2" --xsl-file $(FOP_STYLE) --fop --fop-opts="-c $(FOP_XCONF)" $*.raw
257         a2x --verbose -a docinfo -f xhtml --xsltproc-opts "--stringparam toc.section.depth 2" --xsl-file $(HTML_STYLE) --stylesheet=$(STYLESHEET) $*.raw
258         case $* in release-notes*) ./fix-html $*.html ;; esac
259
260 .html.pdf:
261         @touch $@
262
263 .tmpl.xsl:
264         xsltproc --output $@ /usr/share/xml/docbook/stylesheet/docbook-xsl/template/titlepage.xsl $*.tmpl
265
266 all:    $(HTML) $(PDF)
267
268 altusmetrum-revhistory.html: altusmetrum.html
269
270 micropeak-revhistory.html: micropeak.html
271
272 telegps-revhistory.html: telegps.html
273
274 altusmetrum.pdf altusmetrum.html: altusmetrum-docinfo.xml $(RAW_FILES) $(IMAGES)
275
276 telegps.html telegps.pdf: telegps-docinfo.xml $(TELEGPS_RAW_FILES) $(IMAGES)
277
278 micropeak.pdf micropeak.html: micropeak-docinfo.xml $(MICROPEAK_RAW_FILES) $(IMAGES)
279
280 easymini.pdf easymini.html: easymini-docinfo.xml $(EASYMINI_RAW_FILES) $(IMAGES)
281
282 telemini-v1-outline.pdf: telemini-v1-outline.txt telemini-v1.svg
283
284 telemini-v3-outline.pdf: telemini-v3-outline.txt telemini-v3.svg
285
286 install:        all
287
288 WEB_ROOT=/home/bdale/web/
289
290 publish:        $(PUBLISH_DOC) $(FONTS)
291         cp $(PUBLISH_DOC) $(WEB_ROOT)/altusmetrum/AltOS/doc/
292         mkdir -p $(WEB_ROOT)/altusmetrum/AltOS/doc/fonts/
293         cp $(FONTS) $(WEB_ROOT)/altusmetrum/AltOS/doc/fonts/
294         (cd $(WEB_ROOT)/altusmetrum ; \
295          git add $(WEB_ROOT)/altusmetrum/AltOS/doc/* ; \
296          git add $(WEB_ROOT)/altusmetrum/AltOS/doc/fonts/* ; \
297          echo "update docs" | \
298          git commit -F - $(WEB_ROOT)/altusmetrum/AltOS/doc/* $(WEB_ROOT)/altusmetrum/AltOS/doc/fonts/* ; \
299          git push)
300
301 publish-keithp: am.html $(PUBLISH_DOC) $(FONTS)
302         scp -p am.html $(PUBLISH_DOC) keithp.com:~keithp/public_html/altos
303         scp -p $(FONTS) keithp.com:~keithp/public_html/altos/fonts
304
305 clean:
306         rm -f am.html $(HTML) $(HTML_REVHISTORY) $(PDF) $(TEMPLATES_XSL) $(RAW_FILES) $(TELEGPS_RAW_FILES) $(MICROPEAK_RAW_FILES)
307
308 distclean: clean
309         rm -f $(HTML) $(PDF)
310
311 $(PDF): $(PDF_CONFIG_FILES)
312 $(HTML): $(HTML_CONFIG_FILES)
313
314 am.html: Makefile make-am-html $(HTML)
315         sh ./make-am-html $(HTML) > $@