Add man page for the gnt-debug script
[ganeti-local] / man / Makefile.am
1 # Build man pages
2
3 man_MANS = ganeti.7 ganeti-os-interface.7 gnt-cluster.8 gnt-node.8 gnt-os.8 \
4            gnt-instance.8 ganeti-noded.8 ganeti-watcher.8 gnt-backup.8 \
5            ganeti-master.8 ganeti-rapi.8 gnt-debug.8
6
7 maninput = $(patsubst %.7,%.in,$(patsubst %.8,%.in,$(man_MANS)))
8
9 EXTRA_DIST = ganeti-os-interface.sgml gnt-cluster.sgml gnt-node.sgml \
10              ganeti-watcher.sgml ganeti.sgml gnt-instance.sgml gnt-os.sgml \
11              gnt-backup.sgml ganeti-noded.sgml ganeti-master.sgml \
12              ganeti-rapi.sgml gnt-debug.sgml footer.sgml $(maninput)
13 CLEANFILES = *.[78]
14 MAINTAINERCLEANFILES = $(maninput)
15
16 # Wrapper around docbook2man to control output filename
17 %.in: %.sgml footer.sgml
18         export LC_ALL=C && \
19         tmpdir=`mktemp -d "./manbuildXXXXXX"` && \
20         docbook2man -o "$$tmpdir" $< && \
21         ok= && \
22         for check in `basename $< .sgml`.{7,8}; do \
23                 if test -f "$$tmpdir/$$check"; then \
24                         mv "$$tmpdir/$$check" $@ && \
25                         ok=1 && \
26                         break; \
27                 fi; \
28         done; \
29         if test -z "$$ok"; then \
30                 echo "Building $@ failed."; \
31                 exit 1; \
32         fi; \
33         rm -rf "$$tmpdir"
34
35 %.7 %.8: %.in Makefile
36         sed -e 's#@LOCALSTATEDIR@#$(localstatedir)#g' \
37             -e 's#@CUSTOM_XEN_KERNEL@#$(XEN_KERNEL)#g' \
38             -e 's#@CUSTOM_XEN_INITRD@#$(XEN_INITRD)#g' \
39             -e 's#@CUSTOM_IALLOCATOR_SEARCH_PATH@#$(IALLOCATOR_SEARCH_PATH)#g' \
40             < $< > $@