[glom] Avoid the requierment for sphinx-build if documentation is disabled.



commit bf018a90f2bb8a17b121fff7aa124bd40291b396
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Apr 19 17:35:38 2010 +0200

    Avoid the requierment for sphinx-build if documentation is disabled.
    
    * configure.ac: Use AC_PATH_PROG() instead of AC_CHECK_PROG() so we get the
        path to use. Only check if --enable-documentation was used.
    * docs/pyglom_reference/Makefile.am: Only build the html if
        --enable-documentation was used (not yet built by default anyway).

 ChangeLog                         |    9 +++++++++
 configure.ac                      |    6 ++++--
 docs/pyglom_reference/Makefile.am |    4 +++-
 3 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2981baf..163081a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2010-04-19  Murray Cumming  <murrayc murrayc com>
 
+    Avoid the requierment for sphinx-build if documentation is disabled.
+
+	* configure.ac: Use AC_PATH_PROG() instead of AC_CHECK_PROG() so we get the
+    path to use. Only check if --enable-documentation was used.
+	* docs/pyglom_reference/Makefile.am: Only build the html if
+    --enable-documentation was used (not yet built by default anyway).
+
+2010-04-19  Murray Cumming  <murrayc murrayc com>
+
     Improved use of sphinx.
 
 	* configure.ac: AC_SUBST() GLOM_ABI_VERSION_UNDERLINED so we can use it
diff --git a/configure.ac b/configure.ac
index 7b7f5f7..dcca0f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -259,8 +259,10 @@ MM_ARG_WITH_TAGFILE_DOC([glibmm-2.4.tag], [glibmm-2.4])
 MM_ARG_WITH_TAGFILE_DOC([cairomm-1.0.tag], [cairomm-1.0])
 MM_ARG_WITH_TAGFILE_DOC([pangomm-1.4.tag], [pangomm-1.4])
 
-AC_CHECK_PROG([SPHINX_BUILD], [sphinx-build])
-AC_SUBST([SPHINX_BUILD])
+AS_IF([test "x$ENABLE_DOCUMENTATION" != xno],
+  [AC_PATH_PROG([SPHINX_BUILD], [sphinx-build], [sphinx-build])],
+  [AC_MSG_ERROR([[The documentation build is enabled, but the sphinx-build tool could not be found.]])]
+)
 
 AC_CONFIG_FILES([Makefile
                  docs/user-guide/Makefile
diff --git a/docs/pyglom_reference/Makefile.am b/docs/pyglom_reference/Makefile.am
index a7315fc..1e996a7 100644
--- a/docs/pyglom_reference/Makefile.am
+++ b/docs/pyglom_reference/Makefile.am
@@ -8,8 +8,10 @@
 #	mkdir html
 #	mv glom_1_14.html html/index.html
 
+if ENABLE_DOCUMENTATION
 html:
 	rm -rf html
-	sphinx-build -b html ./ html/
+	$(SPHINX_BUILD) -b html ./ html/
+endif
 
 MAINTAINERCLEANFILES = html/* outdir



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]