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