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