Fix documentation building rules
authorMichele Tartara <mtartara@google.com>
Thu, 1 Aug 2013 08:41:04 +0000 (10:41 +0200)
committerMichele Tartara <mtartara@google.com>
Thu, 1 Aug 2013 09:29:51 +0000 (11:29 +0200)
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 <mtartara@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

Makefile.am
configure.ac

index 8aed59b..586a115 100644 (file)
@@ -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 = \
index e047f14..76b77d5 100644 (file)
@@ -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],