summaryrefslogtreecommitdiff
path: root/doc/Makefile
blob: df1a884c78945e280209f5d3ff11f77eafe79d99 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
#
#	http://docbook.sourceforge.net/release/xsl/current/README
#

RELNOTES_INC=\
	release-notes-0.7.1.inc \
	release-notes-0.8.inc \
	release-notes-0.9.inc \
	release-notes-0.9.2.inc \
	release-notes-1.0.1.inc \
	release-notes-1.1.inc \
	release-notes-1.1.1.inc \
	release-notes-1.2.inc \
	release-notes-1.2.1.inc \
	release-notes-1.3.inc \
	release-notes-1.3.1.inc \
	release-notes-1.3.2.inc \
	release-notes-1.4.inc \
	release-notes-1.4.1.inc \
	release-notes-1.4.2.inc \
	release-notes-1.5.inc \
	release-notes-1.6.inc \
	release-notes-1.6.1.inc

PICTURES=\
	altosui.png \
	ascent.png \
	configure-altimeter.png \
	configure-altosui.png \
	configure-groundstation.png \
	configure-pyro.png \
	descent.png \
	device-selection.png \
	easymini-top.jpg \
	fire-igniter.png \
	graph-configure.png \
	graph-map.png \
	graph.png \
	graph-stats.png \
	landed.png \
	launch-pad.png \
	load-maps.png \
	micropeak-app.png \
	micropeak-back.jpg \
	micropeak-device-dialog.png \
	micropeak-dime.jpg \
	micropeak-download.png \
	micropeak-graph-configure.png \
	micropeak-graph.png \
	micropeak-preferences.png \
	micropeak-raw-data.png \
	micropeak-save-dialog.png \
	micropeak-statistics.png \
	MicroPeakUSB-2.0-inuse.jpg \
	MicroPeakUSB-2.0.jpg \
	monitor-idle.png \
	scan-channels.png \
	site-map.png \
	table.png \
	telemega-v1.0-top.jpg \
	telemetrum-v1.1-thside.jpg \
	telemini-v1-top.jpg \
	telemini-v2-top.jpg

TXT_FILES=altusmetrum.txt

INC_FILES=\
	dedication.inc \
	intro.inc \
	getting-started.inc \
	usage.inc \
	telemetrum.inc \
	telemini-v1.0.inc \
	telemini-v2.0.inc \
	easymini.inc \
	telemega.inc \
	easymega.inc \
	installation.inc \
	using-am-products.inc \
	updating-firmware.inc \
	altosui.inc \
	altosdroid.inc \
	system-operation.inc \
	pyro-channels.inc \
	flight-data-recording.inc \
	handling.inc \
	specs.inc \
	release-notes.inc \
	$(RELNOTES_INC)

RAW_FILES=$(TXT_FILES:.txt=.raw) $(INC_FILES:.inc=.raw)

TELEGPS_INC_FILES=\
	dedication.inc \
	telegps-quick-start.inc \
	telegps-using.inc \
	telegps-system-operation.inc \
	telegps-application.inc \
	handling.inc \
	telegps-specs.inc \
	telegps-updating-firmware.inc \
	telegps-release-notes.inc

TELEGPS_TXT_FILES=\
	telegps.txt

TELEGPS_RAW_FILES=$(TELEGPS_TXT_FILES:.txt=.raw) $(TELEGPS_INC_FILES:.inc=.raw)

MICROPEAK_TXT_FILES=\
	micropeak.txt

MICROPEAK_INC_FILES=

MICROPEAK_RAW_FILES=$(MICROPEAK_TXT_FILES:.txt=.raw) $(MICROPEAK_INC_FILES:.inc=.raw)

OUTLINE_TXT_FILES=\
	easymega-outline.txt \
	easymini-outline.txt \
	telemega-outline.txt \
	telemetrum-outline.txt \
	telemini-outline.txt

OUTLINE_RAW_FILES=$(OUTLINE_TXT_FILES:.txt=.raw)

OUTLINE_PDF_FILES=$(OUTLINE_TXT_FILES:.txt=.pdf)

SVG=\
	easymini.svg \
	telemega.svg \
	telemetrum.svg \
	telemini.svg \
	easymega.svg

RELNOTES_PDF=$(RELNOTES_INC:.inc=.pdf)
RELNOTES_HTML=$(RELNOTES_INC:.inc=.html)

HTML=altusmetrum.html altos.html telemetry.html companion.html micropeak.html telegps.html $(RELNOTES_HTML)

PDF=altusmetrum.pdf $(RELNOTES_PDF) altos.pdf telemetry.pdf companion.pdf micropeak.pdf telegps.pdf \
	$(OUTLINE_PDF_FILES)

FOSTYLE=xorg-fo.xsl

TEMPLATES_TMPL=titlepage.templates.tmpl

TEMPLATES_XSL=$(TEMPLATES_TMPL:.tmpl=.xsl)

IMAGES=$(PICTURES) $(SVG)

DOC=$(HTML) $(PDF) $(IMAGES)

.SUFFIXES: .tmpl .xsl .inc .txt .raw .pdf .html

XSLTFLAGS=--stringparam section.autolabel 1 --xinclude

.txt.raw:
	sed -e 's/@@VERSION@@/$(VERSION)/' -e 's/@@DATE@@/$(DATE)/' -e 's/^[ 	]*//' -e 's/^\\//' $*.txt > $@

.inc.raw:
	sed -e 's/@@VERSION@@/$(VERSION)/' -e 's/@@DATE@@/$(DATE)/' -e 's/^[ 	]*//' -e 's/^\\//' $*.inc > $@

.raw.pdf:
	a2x --verbose -a docinfo -f pdf --xsltproc-opts "--stringparam toc.section.depth 2" --xsl-file am-fo.xsl --fop --fop-opts="-c fop.xconf" $*.raw

.raw.html:
	a2x --verbose -a docinfo -f xhtml --xsltproc-opts "--stringparam toc.section.depth 2" --stylesheet=am.css $*.raw

.tmpl.xsl:
	xsltproc --output $@ /usr/share/xml/docbook/stylesheet/docbook-xsl/template/titlepage.xsl $*.tmpl

all:	$(HTML) $(PDF)

$(HTML): $(PDF)

altusmetrum.pdf altusmetrum.html: altusmetrum-docinfo.xml $(RAW_FILES) $(RAW_INC) $(IMAGES)

telegps.html telegps.pdf: telegps-docinfo.xml $(TELEGPS_RAW_FILES) $(IMAGES)

micropeak.pdf micropeak.html: micropeak-docinfo.xml $(MICROPEAK_RAW_FILES) $(IMAGES)

install:	all

publish:	$(DOC)
	cp $(DOC) /home/bdale/web/altusmetrum/AltOS/doc/
	(cd /home/bdale/web/altusmetrum ; \
	 git add /home/bdale/web/altusmetrum/AltOS/doc/* ; \
	 echo "update docs" | \
	 git commit -F - /home/bdale/web/altusmetrum/AltOS/doc/* ; \
	 git push)

clean:
	rm -f $(HTML) $(PDF) $(TEMPLATES_XSL)

distclean: clean
	rm -f $(HTML) $(PDF)

$(PDF): $(FOSTYLE) $(TEMPLATES_XSL)
$(HTML): $(TEMPLATES_XSL)