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