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