]> kaliko git repositories - mpd-sima.git/blob - data/man/Makefile
Add test-tags-config helper
[mpd-sima.git] / data / man / Makefile
1 # Packages needed on debian:
2 #    * xsltproc
3 #    * docbook-xsl-ns (which depends on docbook-xsl-doc-html and docbook5-xml)
4 #    * libxml2-utils
5 #
6
7 XSL=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/manpages/docbook.xsl
8 HXSL=/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/html/docbook.xsl
9 CONV5XSL="/usr/share/xml/docbook/stylesheet/docbook5/db4-upgrade.xsl"
10 XP=/usr/bin/xsltproc
11 OPTIONS=--nonet\
12    --param make.year.ranges 1\
13    --param make.single.year.ranges 1 \
14    --param man.charmap.use.subset 0 \
15    --novalid \
16
17 all: man
18
19 test-tags-config: test-tags-config.1.xml
20         xmllint --xinclude --nowarning --noent $< | $(XP) $(OPTIONS) $(XSL) -
21
22 simadb_cli: simadb_cli.1.xml
23         xmllint --xinclude --nowarning --noent $< | $(XP) $(OPTIONS) $(XSL) -
24
25 mpd_sima: mpd_sima.1.xml
26         xmllint --xinclude --nowarning --noent $< | $(XP) $(OPTIONS) $(XSL) -
27
28 mpd_sima.cfg: mpd_sima.cfg.5.xml
29         xmllint --xinclude --nowarning --noent $< | $(XP) $(OPTIONS) $(XSL) -
30
31 mpd_sima_html:
32         xmllint --xinclude --nowarning --noent mpd_sima.1.xml | $(XP) $(HXSL) - > ./mpd_sima.1.html
33
34 simadb_cli_html:
35         xmllint --xinclude --nowarning --noent simadb_cli.1.xml | $(XP) $(HXSL) - > ./simadb_cli.1.html
36
37 mpd_sima.cfg_html:
38         xmllint --xinclude --nowarning --noent mpd_sima.cfg.5.xml | $(XP) $(HXSL) - > ./mpd_sima.cfg.5.html
39
40 man: test-tags-config simadb_cli mpd_sima mpd_sima.cfg
41
42 html: simadb_cli_html mpd_sima_html mpd_sima.cfg_html
43
44 pdf: simadb_cli.1 mpd-sima.1 mpd-sima.cfg.5
45         /usr/bin/man -l -Tps mpd-sima.1 | /usr/bin/ps2pdf - ./mpd_sima.pdf
46         /usr/bin/man -l -Tps mpd-sima.cfg.5 | /usr/bin/ps2pdf - ./mpd_sima.cfg.pdf
47         /usr/bin/man -l -Tps simadb_cli.1 | /usr/bin/ps2pdf - ./simadb_cli.pdf
48
49 valid:
50         xmllint --noout --valid ./*.xml
51
52 clean_mpd_sima:
53         rm -rf mpd-sima.1 mpd_sima.1.html
54
55 clean_simadb_cli:
56         rm -rf simadb_cli.1 simadb_cli.1.html
57
58 clean_mpd_sima.cfg:
59         rm -rf mpd_sima.cfg.5 mpd_sima.cfg.5.html
60
61 clean: clean_mpd_sima clean_simadb_cli clean_mpd_sima.cfg
62         rm -rf ./*.pdf