Some environments like embedded systems may not care about about the man pages, which require the SGML tools to be installed.
So add an option to make the man pages optional to make it easier to build nbd-server and nbd-client without the need for installing the SGML tools. Signed-off-by: Adriana Kobylak <a...@linux.ibm.com> --- Makefile.am | 2 +- configure.ac | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index 4fcfd63..788f9f1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ ACLOCAL_AMFLAGS = -I support -SUBDIRS = . man doc tests systemd gznbd +SUBDIRS = . $(MAN_SUBDIR) doc tests systemd gznbd bin_PROGRAMS = nbd-server nbd-trdump EXTRA_PROGRAMS = nbd-client make-integrityhuge noinst_LTLIBRARIES = libnbdsrv.la libcliserv.la diff --git a/configure.ac b/configure.ac index c015ba0..a517877 100644 --- a/configure.ac +++ b/configure.ac @@ -333,6 +333,19 @@ else AC_DEFINE(HAVE_NETLINK, 0, [Define to 1 if we have netlink support]) fi +AC_ARG_ENABLE([manpages], + AS_HELP_STRING([--disable-manpages], [Do not install man pages])) +AS_IF([test "x$enable_manpages" != "xno"], [ + AC_SUBST([MAN_SUBDIR],["man"]) + AC_SUBST([MAN_CONFIG_FILES],["\ + man/nbd-client.8.sh \ + man/nbd-server.5.sh \ + man/nbd-server.1.sh \ + man/nbd-trdump.1.sh \ + man/nbdtab.5.sh \ + "]) + ]) + AC_HEADER_SYS_WAIT AC_TYPE_OFF_T AC_TYPE_PID_T @@ -351,11 +364,7 @@ AC_CONFIG_FILES([Makefile tests/Makefile tests/code/Makefile tests/run/Makefile - man/nbd-client.8.sh - man/nbd-server.5.sh - man/nbd-server.1.sh - man/nbd-trdump.1.sh - man/nbdtab.5.sh + $MAN_CONFIG_FILES systemd/Makefile systemd/n...@.service.sh ]) -- 1.8.3.1 _______________________________________________ Nbd-general mailing list Nbd-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nbd-general