root / man / Makefile.am @ bf6fe28b
History | View | Annotate | Download (1 kB)
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 |
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 |
footer.sgml $(maninput) |
13 |
CLEANFILES = *.[78] |
14 |
MAINTAINERCLEANFILES = $(maninput) |
15 |
|
16 |
# Wrapper around docbook2man to control the output's filename |
17 |
%.in: %.sgml footer.sgml |
18 |
tmpdir=`mktemp -d "./manbuildXXXXXX"` && \ |
19 |
docbook2man -o "$$tmpdir" $< && \ |
20 |
ok= && \ |
21 |
for check in `basename $< .sgml`.{7,8}; do \ |
22 |
if test -f "$$tmpdir/$$check"; then \ |
23 |
mv "$$tmpdir/$$check" $@ && \ |
24 |
ok=1 && \ |
25 |
break; \ |
26 |
fi; \ |
27 |
done; \ |
28 |
if test -z "$$ok"; then \ |
29 |
echo "Building $@ failed."; \ |
30 |
exit 1; \ |
31 |
fi; \ |
32 |
rm -rf "$$tmpdir" |
33 |
|
34 |
%.7 %.8: %.in Makefile |
35 |
sed -e 's#@LOCALSTATEDIR@#$(localstatedir)#g' < $< > $@ |