06346a2d5d5c2358e015bcd66e93d9fefbbefca0
[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
16 RELNOTES_XSL=$(RELNOTES:.html=.xsl)
17 HTML=altusmetrum.html altos.html telemetry.html companion.html micropeak.html $(RELNOTES)
18 PDF=altusmetrum.pdf altos.pdf telemetry.pdf companion.pdf micropeak.pdf
19 DOC=$(HTML) $(PDF)
20 HTMLSTYLE=/usr/share/xml/docbook/stylesheet/docbook-xsl/html/docbook.xsl
21 FOSTYLE=/usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl
22 PDFSTYLE=
23 IMAGES=telemetrum.svg telemini.svg
24
25 .SUFFIXES: .xsl .html .fo .pdf
26
27 XSLTFLAGS=--stringparam section.autolabel 1 --xinclude
28
29 .xsl.html:
30         xsltproc $(XSLTFLAGS) -o $@ $(HTMLSTYLE) $*.xsl
31
32 .xsl.fo:
33         xsltproc $(XSLTFLAGS) -o $@ $(FOSTYLE) $*.xsl
34
35 .fo.pdf:
36         fop -fo $*.fo -pdf $@
37
38 all:    $(HTML) $(PDF)
39
40 install:        all
41
42 publish:        $(DOC)
43         cp $(DOC) /home/bdale/web/altusmetrum/AltOS/doc/
44         (cd /home/bdale/web/altusmetrum ; \
45          git add /home/bdale/web/altusmetrum/AltOS/doc/* ; \
46          echo "update docs" | \
47          git commit -F - /home/bdale/web/altusmetrum/AltOS/doc/* ; \
48          git push)
49
50 clean:
51         rm -f $(HTML) $(PDF) *.fo
52
53 distclean:
54         rm -f $(HTML) $(PDF) *.fo
55
56 altusmetrum.html: $(RELNOTES_XSL) $(IMAGES)
57 altusmetrum.fo: $(RELNOTES_XSL) $(IMAGES)
58
59 indent:         altusmetrum.xsl
60         xmlindent -i 2 < altusmetrum.xsl > altusmetrum.new
61