]> kaliko git repositories - mpd-sima.git/blob - data/Makefile
Generate manual and update setup.py
[mpd-sima.git] / data / 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 simadb_cli: simadb_cli.1.xml
20         $(XP) $(OPTIONS) $(XSL) $<
21
22 mpd_sima: mpd_sima.1.xml
23         xmllint --xinclude --nowarning --noent $< | $(XP) $(OPTIONS) $(XSL) -
24
25 mpd_sima.cfg: mpd_sima.cfg.5.xml
26         xmllint --xinclude --nowarning --noent $< | $(XP) $(OPTIONS) $(XSL) -
27
28 mpd_sima_html:
29         xmllint --xinclude --nowarning --noent mpd_sima.1.xml | $(XP) $(HXSL) - > ./mpd_sima.1.html
30
31 simadb_cli_html:
32         $(XP) $(HXSL) simadb_cli.1.xml > ./simadb_cli.1.html
33
34 mpd_sima.cfg_html:
35         $(XP) $(HXSL) mpd_sima.cfg.5.xml > ./mpd_sima.cfg.5.html
36
37 man: simadb_cli mpd_sima mpd_sima.cfg
38
39 html: simadb_cli_html mpd_sima_html mpd_sima.cfg_html
40
41 pdf: simadb_cli.1 mpd-sima.1 mpd-sima.cfg.5
42         /usr/bin/man -l -Tps mpd-sima.1 | /usr/bin/ps2pdf - ./mpd_sima.pdf
43         /usr/bin/man -l -Tps mpd-sima.cfg.5 | /usr/bin/ps2pdf - ./mpd_sima.cfg.pdf
44         /usr/bin/man -l -Tps simadb_cli.1 | /usr/bin/ps2pdf - ./simadb_cli.pdf
45
46 valid:
47         xmllint --noout --valid ./*.xml
48
49 clean_mpd_sima:
50         rm -rf mpd-sima.1 mpd_sima.1.html
51
52 clean: clean_mpd_sima