]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Generate only if docbook is installed
authordlezcano <dlezcano>
Tue, 18 Nov 2008 14:03:57 +0000 (14:03 +0000)
committerdlezcano <dlezcano>
Tue, 18 Nov 2008 14:03:57 +0000 (14:03 +0000)
From: Daniel Lezcano <dlezcano@fr.ibm.com>

Generate the man pages only if the docbook tool is available.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
configure.in
doc/Makefile.am [new file with mode: 0644]

index 52e6cb32ff597694680377b4d8bbf42205102483..1859c905718e8fd409c3f60e9f9d31c706283482 100644 (file)
@@ -13,6 +13,8 @@ AM_PROG_CC_C_O
 AC_GNU_SOURCE
 AC_PROG_LIBTOOL
 AC_CHECK_PROG(SETCAP, setcap, yes, no)
+AC_CHECK_PROG(DOCBOOK, docbook2man, yes, no)
+AM_CONDITIONAL(ENABLE_DOCBOOK, test x$DOCBOOK = xyes)
 
 AC_CHECK_HEADERS([linux/netlink.h linux/genetlink.h], [], AC_MSG_ERROR([netlink headers not found]),
 [#include <linux/types.h>
@@ -72,6 +74,17 @@ AC_CONFIG_FILES([
 AC_CONFIG_COMMANDS([default],[[]],[[]])
 AC_OUTPUT
 
+if test "x$DOCBOOK" = "xno"; then
+   AC_MSG_NOTICE([ 
+
+Warning:
+--------
+The docbook tool is not installed, the man pages won't be generated.
+
+])
+
+fi
+
 if test "x$SETCAP" = "xno"; then
    AC_MSG_NOTICE([ 
 
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644 (file)
index 0000000..451549b
--- /dev/null
@@ -0,0 +1,18 @@
+if ENABLE_DOCBOOK
+man_MANS = \
+       lxc-create.1 \
+       lxc-destroy.1 \
+       lxc-execute.1 \
+       lxc-start.1 \
+       lxc-stop.1 \
+       lxc-freeze.1 \
+       lxc-unfreeze.1 \
+       lxc-monitor.1 \
+       lxc-wait.1 \
+       lxc-ls.1 \
+       lxc-ps.1
+
+
+%.1 : %.sgml 
+       docbook2man $<
+endif
\ No newline at end of file