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