b9f461969f01ca974e713b3366434814c62fb10a
[fw/altos] / doc / Makefile
1 #
2 #       http://docbook.sourceforge.net/release/xsl/current/README
3 #
4
5 RELNOTES=\
6         release-notes-0.7.1.html \
7         release-notes-0.8.html \
8         release-notes-0.9.html \
9         release-notes-0.9.2.html \
10         release-notes-1.0.1.html \
11         release-notes-1.1.html \
12         release-notes-1.1.1.html \
13         release-notes-1.2.html \
14         release-notes-1.2.1.html \
15         release-notes-1.3.html \
16         release-notes-1.3.1.html \
17         release-notes-1.3.2.html \
18         release-notes-1.4.html \
19         release-notes-1.4.1.html \
20         release-notes-1.5.html \
21         release-notes-1.6.html \
22         release-notes-1.6.1.html
23
24 PICTURES=\
25         altosui.png \
26         ascent.png \
27         configure-altimeter.png \
28         configure-altosui.png \
29         configure-groundstation.png \
30         configure-pyro.png \
31         descent.png \
32         device-selection.png \
33         easymini-top.jpg \
34         fire-igniter.png \
35         graph-configure.png \
36         graph-map.png \
37         graph.png \
38         graph-stats.png \
39         landed.png \
40         launch-pad.png \
41         load-maps.png \
42         micropeak-app.png \
43         micropeak-back.jpg \
44         micropeak-device-dialog.png \
45         micropeak-dime.jpg \
46         micropeak-download.png \
47         micropeak-graph-configure.png \
48         micropeak-graph.png \
49         micropeak-preferences.png \
50         micropeak-raw-data.png \
51         micropeak-save-dialog.png \
52         micropeak-statistics.png \
53         MicroPeakUSB-2.0-inuse.jpg \
54         MicroPeakUSB-2.0.jpg \
55         monitor-idle.png \
56         scan-channels.png \
57         site-map.png \
58         table.png \
59         telemega-v1.0-top.jpg \
60         telemetrum-v1.1-thside.jpg \
61         telemini-v1-top.jpg \
62         telemini-v2-top.jpg
63
64 TXT_FILES=altusmetrum.txt
65 INC_FILES=\
66         dedication.inc \
67         intro.inc \
68         getting-started.inc \
69         usage.inc \
70         telemetrum.inc \
71         telemini-v1.0.inc \
72         telemini-v2.0.inc \
73         easymini.inc \
74         telemega.inc \
75         easymega.inc \
76         installation.inc \
77         altosui.inc \
78         system-operation.inc \
79         pyro-channels.inc \
80         flight-data-recording.inc \
81         handling.inc \
82         specs.inc
83
84 RAW_FILES=$(TXT_FILES:.txt=.raw)
85
86 RAW_INC=$(INC_FILES:.inc=.raw)
87
88 AD_PDF=$(TXT_FILES:.txt=.pdf)
89
90 SVG=\
91         easymini.svg \
92         telemega.svg \
93         telemetrum.svg \
94         telemini.svg \
95         easymega.svg
96
97 RELNOTES_XSL=$(RELNOTES:.html=.xsl)
98 HTML=altusmetrum.html altos.html telemetry.html companion.html micropeak.html telegps.html $(RELNOTES)
99 PDF=altusmetrum.pdf altos.pdf telemetry.pdf companion.pdf micropeak.pdf telegps.pdf \
100         telemetrum-outline.pdf telemega-outline.pdf easymini-outline.pdf easymega-outline.pdf $(AD_PDF)
101 HTMLSTYLE=/usr/share/xml/docbook/stylesheet/docbook-xsl/html/docbook.xsl
102 FOSTYLE=xorg-fo.xsl
103 FOPCFG=fop-cfg.xml
104 TEMPLATES=titlepage.templates.xsl
105 PDFSTYLE=
106 IMAGES=$(PICTURES) $(SVG)
107 DOC=$(HTML) $(PDF) $(IMAGES)
108
109 .SUFFIXES: .inc .txt .raw .pdf .html
110
111 XSLTFLAGS=--stringparam section.autolabel 1 --xinclude
112
113 .txt.raw:
114         sed -e 's/@@VERSION@@/$(VERSION)/' -e 's/@@DATE@@/$(DATE)/' -e 's/^[    ]*//' -e 's/^\\//' $*.txt > $@
115
116 .inc.raw:
117         sed -e 's/@@VERSION@@/$(VERSION)/' -e 's/@@DATE@@/$(DATE)/' -e 's/^[    ]*//' -e 's/^\\//' $*.inc > $@
118
119 .raw.pdf:
120         a2x --verbose -k -d book -a docinfo -f pdf --xsltproc-opts "--stringparam toc.section.depth 2" --xsl-file am-fo.xsl --fop --fop-opts="-c fop.xconf" $*.raw
121
122 .raw.html:
123         a2x --verbose -k -d book -a docinfo -f xhtml --xsltproc-opts "--stringparam toc.section.depth 2" --stylesheet=am.css $*.raw
124
125 .xsl.html:
126         xsltproc $(XSLTFLAGS) -o $@ $(HTMLSTYLE) $*.xsl
127
128 .xsl.pdf:
129         xmlto -p '-c $(FOPCFG)' --searchpath `pwd` -x $(FOSTYLE) --with-fop pdf $*.xsl
130
131 .xml.xsl:
132         xsltproc --output $@ /usr/share/xml/docbook/stylesheet/docbook-xsl/template/titlepage.xsl $*.xml
133
134 all:    $(HTML) $(PDF)
135
136 altusmetrum.pdf: altusmetrum-docinfo.xml $(RAW_FILES) $(RAW_INC)
137
138 install:        all
139
140 publish:        $(DOC)
141         cp $(DOC) /home/bdale/web/altusmetrum/AltOS/doc/
142         (cd /home/bdale/web/altusmetrum ; \
143          git add /home/bdale/web/altusmetrum/AltOS/doc/* ; \
144          echo "update docs" | \
145          git commit -F - /home/bdale/web/altusmetrum/AltOS/doc/* ; \
146          git push)
147
148 clean:
149         rm -f $(HTML) $(PDF) $(TEMPLATES)
150
151 distclean:
152         rm -f $(HTML) $(PDF)
153
154 altusmetrum.html: $(RELNOTES_XSL) $(IMAGES)
155 altusmetrum.pdf: $(RELNOTES_XSL) $(IMAGES)
156
157 telegps.html: $(RELNOTES_XSL) $(IMAGES)
158 telegps.pdf: $(RELNOTES_XSL) $(IMAGES)
159
160 $(PDF): $(FOSTYLE) $(TEMPLATES) $(FOPCFG)
161
162 indent:         altusmetrum.xsl
163         xmlindent -i 2 < altusmetrum.xsl > altusmetrum.new
164
165 $(FOPCFG): Makefile
166         (echo '<fop version="1.0">'; echo '  <base>'"`pwd`"'</base>'; echo '</fop>') > $@
167