[tracker/tracker-0.12] build: Don't use HAVE_GTK_DOC to determine building docs



commit bb8001f5df092ededc790ff42a9cde4136ffd6c6
Author: Martyn Russell <martyn lanedo com>
Date:   Mon Oct 3 11:27:37 2011 +0100

    build: Don't use HAVE_GTK_DOC to determine building docs
    
    Now we use ENABLE_GTK_DOC like other projects and have updated configure
    according to the latest recommendations from the gtk-doc documentation.
    Additionally, we only use ENABLE_GTK_DOC to disable building ontology
    documentation because we use that before detection of the other tools we need
    when building documentation (such as dia and graphviz).
    
    Fixes GB#659995.

 configure.ac               |   14 +++++++++++---
 docs/Makefile.am           |   14 +++++++++++---
 docs/reference/Makefile.am |    6 ++++--
 3 files changed, 26 insertions(+), 8 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 05e608c..282119c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -561,11 +561,20 @@ AM_CONDITIONAL(DIST_FUNCTIONAL_TESTS, test "x$enable_functional_tests" != "xno")
 # Check for gtk-doc and docbook-tools
 ####################################################################
 
+# Check for GTK_DOC_CHECK availability. The GTK_DOC_CHECK invocation
+# must be on its own line, gtkdocize relies on it
+m4_ifdef([GTK_DOC_CHECK], [
 GTK_DOC_CHECK([1.8])
 
-if test "x$enable_gtk_doc" != "xno"; then
-   AC_DEFINE(HAVE_GTK_DOC, 1, [Define if we have gtk-doc (with gtk-doc)])
+# NOTE: We need to use a separate automake conditional for this
+#       to make this work with the tarballs.
+AM_CONDITIONAL([ENABLE_GTK_DOC], test "x$enable_gtk_doc" = xyes)
+],
+[
+AM_CONDITIONAL([ENABLE_GTK_DOC], false)
+])
 
+if test "x$enable_gtk_doc" != xno; then
    # Check for dia if we are building gtk_doc
    AC_PATH_PROG(DIA, dia)
    AC_SUBST(DIA)
@@ -583,7 +592,6 @@ if test "x$enable_gtk_doc" != "xno"; then
    fi
 fi
 
-AM_CONDITIONAL(HAVE_GTK_DOC, test "$enable_gtk_doc" = "yes")
 AM_CONDITIONAL(HAVE_GRAPHVIZ_FDP, test -n "$GRAPHVIZ_FDP")
 
 ####################################################################
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 6562626..ac913b0 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -1,7 +1,15 @@
 include $(top_srcdir)/Makefile.decl
 
-SUBDIRS = manpages design
+SUBDIRS = manpages design tools reference
 
-if HAVE_GTK_DOC
-SUBDIRS += tools reference
+# require gtk-doc when making dist
+#
+if ENABLE_GTK_DOC
+dist-check-gtk-doc:
+else
+dist-check-gtk-doc:
+	@echo "*** gtk-doc must be enabled in order to make dist"
+	@false
 endif
+
+dist-hook: dist-check-gtk-doc
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 98f0763..60e526c 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -3,6 +3,8 @@ include $(top_srcdir)/Makefile.decl
 SUBDIRS =                                              \
 	libtracker-sparql                              \
 	libtracker-extract                             \
-	libtracker-miner                               \
-	ontology
+	libtracker-miner
 
+if ENABLE_GTK_DOC
+SUBDIRS += ontology
+endif



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