root / man / Makefile.am @ 5b209f0c
History | View | Annotate | Download (1005 Bytes)
1 | a8083063 | Iustin Pop | # Build man pages |
---|---|---|---|
2 | a8083063 | Iustin Pop | |
3 | dd4b1106 | Iustin Pop | man_MANS = ganeti.7 ganeti-os-interface.7 gnt-cluster.8 gnt-node.8 gnt-os.8 \ |
4 | dd4b1106 | Iustin Pop | gnt-instance.8 ganeti-noded.8 ganeti-watcher.8 gnt-backup.8 |
5 | dd4b1106 | Iustin Pop | |
6 | 26c7e094 | Michael Hanselmann | maninput = $(patsubst %.7,%.in,$(patsubst %.8,%.in,$(man_MANS))) |
7 | 26c7e094 | Michael Hanselmann | |
8 | a8083063 | Iustin Pop | EXTRA_DIST = ganeti-os-interface.sgml gnt-cluster.sgml gnt-node.sgml \ |
9 | dd4b1106 | Iustin Pop | ganeti-watcher.sgml ganeti.sgml gnt-instance.sgml gnt-os.sgml \ |
10 | dd4b1106 | Iustin Pop | gnt-backup.sgml ganeti-noded.sgml \ |
11 | 26c7e094 | Michael Hanselmann | footer.sgml $(maninput) |
12 | 26c7e094 | Michael Hanselmann | CLEANFILES = *.[78] |
13 | 26c7e094 | Michael Hanselmann | MAINTAINERCLEANFILES = *.in |
14 | 26c7e094 | Michael Hanselmann | |
15 | 26c7e094 | Michael Hanselmann | # Wrapper around docbook2man to control the output's filename |
16 | 26c7e094 | Michael Hanselmann | %.in: %.sgml footer.sgml |
17 | 26c7e094 | Michael Hanselmann | tmpdir=`mktemp -d "./manbuildXXXXXX"` && \ |
18 | 26c7e094 | Michael Hanselmann | docbook2man -o "$$tmpdir" $< && \ |
19 | 26c7e094 | Michael Hanselmann | ok= && \ |
20 | 26c7e094 | Michael Hanselmann | for check in `basename $< .sgml`.{7,8}; do \ |
21 | 26c7e094 | Michael Hanselmann | if test -f "$$tmpdir/$$check"; then \ |
22 | 26c7e094 | Michael Hanselmann | mv "$$tmpdir/$$check" $@ && \ |
23 | 26c7e094 | Michael Hanselmann | ok=1 && \ |
24 | 26c7e094 | Michael Hanselmann | break; \ |
25 | 26c7e094 | Michael Hanselmann | fi; \ |
26 | 26c7e094 | Michael Hanselmann | done; \ |
27 | 26c7e094 | Michael Hanselmann | if test -z "$$ok"; then \ |
28 | 26c7e094 | Michael Hanselmann | echo "Building $@ failed."; \ |
29 | 26c7e094 | Michael Hanselmann | exit 1; \ |
30 | 26c7e094 | Michael Hanselmann | fi; \ |
31 | 26c7e094 | Michael Hanselmann | rm -rf "$$tmpdir" |
32 | a8083063 | Iustin Pop | |
33 | 26c7e094 | Michael Hanselmann | %.7 %.8: %.in Makefile |
34 | 26c7e094 | Michael Hanselmann | sed -e 's#@LOCALSTATEDIR@#$(localstatedir)#g' < $< > $@ |