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