From d99dd9c7df8d7492d4234daec71436bb71ba4861 Mon Sep 17 00:00:00 2001 From: Michele Tartara Date: Thu, 1 Aug 2013 10:41:04 +0200 Subject: [PATCH] Fix documentation building rules Implement the correct behavior to be kept when sphinx-build is not installed. It was already correctly checked, but instead of just disabling the documentation generation, an error message was printed, having "make" fail. Signed-off-by: Michele Tartara Reviewed-by: Thomas Thrainer --- Makefile.am | 5 ++++- configure.ac | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 8aed59b90..586a11552 100644 --- a/Makefile.am +++ b/Makefile.am @@ -745,14 +745,17 @@ endif # Things to build but not to install (add it to EXTRA_DIST if it should be # distributed) noinst_DATA = \ - doc/html \ $(BUILT_EXAMPLES) \ doc/examples/bash_completion \ doc/examples/bash_completion-debug \ $(manhtml) +if HAS_SPHINX if MANPAGES_IN_DOC noinst_DATA += doc/man-html +else +noinst_DATA += doc/html +endif endif gnt_scripts = \ diff --git a/configure.ac b/configure.ac index e047f1482..76b77d515 100644 --- a/configure.ac +++ b/configure.ac @@ -408,6 +408,7 @@ else AC_MSG_ERROR([Sphinx 1.0 or higher is required]) fi fi +AM_CONDITIONAL([HAS_SPHINX], [test -n "$SPHINX"]) AC_ARG_ENABLE([manpages-in-doc], [AS_HELP_STRING([--enable-manpages-in-doc], -- GitLab