diff mbox

[ndctl] ndctl: add '--disable-docs' option to configure

Message ID 20160310155115.29036.52353.stgit@dwillia2-desk3.jf.intel.com (mailing list archive)
State Accepted
Commit 3aceba33a5c4
Headers show

Commit Message

Dan Williams March 10, 2016, 3:51 p.m. UTC
For environments that want to build without the documentation add an
option to omit the Documentation/ sub-directory.

Reported-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 Makefile.am  |    2 ++
 configure.ac |    9 +++++++++
 2 files changed, 11 insertions(+)
diff mbox

Patch

diff --git a/Makefile.am b/Makefile.am
index ce97a15c7c0d..84582771e97d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,7 @@ 
 EXTRA_DIST =
+if ENABLE_DOCS
 SUBDIRS = . Documentation
+endif
 CLEANFILES =
 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 AM_MAKEFLAGS = --no-print-directory
diff --git a/configure.ac b/configure.ac
index 9506e8e7dd25..96a02d9f9972 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,6 +58,15 @@  AS_IF([test "x$enable_logging" = "xyes"], [
         AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
 ])
 
+AC_ARG_ENABLE([docs],
+        AS_HELP_STRING([--disable-docs],
+	[disable documentation build @<:@default=enabled@:>@]),
+        [], enable_docs=yes)
+AS_IF([test "x$enable_docs" = "xyes"], [
+        AC_DEFINE(ENABLE_DOCS, [1], [Documentation / man pages.])
+])
+AM_CONDITIONAL([ENABLE_DOCS], [test "x$enable_docs" = "xyes"])
+
 AC_ARG_ENABLE([debug],
         AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
         [], [enable_debug=no])