[tracker] Make graphviz a build dependency but only with gtk-doc enabled



commit b56e879180177942ed1b59f49e2e15d65f340ea3
Author: Martyn Russell <martyn lanedo com>
Date:   Fri Dec 18 13:39:31 2009 +0000

    Make graphviz a build dependency but only with gtk-doc enabled

 configure.ac           |   23 ++++++++++++++++-------
 docs/Makefile.am       |    7 +++++--
 docs/tools/Makefile.am |   18 ++++++------------
 3 files changed, 27 insertions(+), 21 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 975a1b5..22777eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -222,10 +222,6 @@ fi
 AC_PATH_PROG(VALAC, valac, valac)
 AC_SUBST(VALAC)
 
-AC_PATH_PROG(GRAPHVIZ_FDP, fdp)
-AC_SUBST(GRAPHVIZ_FDP)
-AM_CONDITIONAL(HAVE_GRAPHVIZ_FDP, test -n "$GRAPHVIZ_FDP")
-
 # Check we have the DBUS binding tool we need
 AC_PATH_PROG(DBUSBINDINGTOOL, dbus-binding-tool)
 if test -z $DBUSBINDINGTOOL; then
@@ -364,7 +360,6 @@ AC_SUBST(GCOV_VALAFLAGS)
 AC_SUBST(GCOV_CFLAGS)
 AC_SUBST(GCOV_LIBS)
 
-
 ####################################################################
 # Should we build GLib based unit tests
 ####################################################################
@@ -1572,9 +1567,21 @@ AM_CONDITIONAL(DIST_FUNCTIONAL_TESTS, test "x$enable_functional_tests" != "xno")
 
 GTK_DOC_CHECK([1.8])
 
-AC_CHECK_PROG(DB2HTML, db2html, true, false)
-AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
+if test "x$enable_gtk_doc" != "xno"; then
+   AC_DEFINE(HAVE_GTK_DOC, 1, [Define if we have gtk-doc (with gtk-doc)])
 
+   # Check for graphviz if we are building gtk_doc
+   AC_PATH_PROG(GRAPHVIZ_FDP, fdp)
+   AC_SUBST(GRAPHVIZ_FDP)
+
+   if test -z "$GRAPHVIZ_FDP"; then
+      AC_MSG_ERROR([Couldn't find Graphviz's fdp tool (graphviz).])
+   fi
+fi
+
+AM_CONDITIONAL(HAVE_GTK_DOC, test "$enable_gtk_doc" = "yes")
+AM_CONDITIONAL(HAVE_GRAPHVIZ_FDP, test -n "$GRAPHVIZ_FDP")
+  
 ##################################################################
 # Check for older tracker project files which can cause problems
 ##################################################################
@@ -1723,6 +1730,8 @@ Build Configuration:
 
 	Win32:					$native_win32
 
+        Enable gtk doc (for documentation):     $enable_gtk_doc
+
 	Enable unit tests:			$have_unit_tests
 	Enable unac accent stripper:	  	$have_unac
 
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 0508209..102b312 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -1,4 +1,7 @@
 include $(top_srcdir)/Makefile.decl
 
-SUBDIRS = manpages design tools reference
-	
+SUBDIRS = manpages design
+
+if HAVE_GTK_DOC
+SUBDIRS += tools reference
+endif
\ No newline at end of file
diff --git a/docs/tools/Makefile.am b/docs/tools/Makefile.am
index 9a195d8..ae5a97d 100644
--- a/docs/tools/Makefile.am
+++ b/docs/tools/Makefile.am
@@ -44,27 +44,21 @@ gen-doc.stamp: ttl2sgml
 	$(top_srcdir)/docs/tools/gen-doc.sh
 	$(AM_V_GEN) touch $@
 
-if HAVE_GRAPHVIZ_FDP
-dist-check-graphviz:
-else
-dist-check-graphviz:
-	@echo "*** Graphviz's fdp tool must be installed in order to make dist"
-	@false
-endif
-
 ontology.dot: ontology-graph
 	$(AM_V_GEN) $(top_srcdir)/docs/tools/ontology-graph -d $(top_srcdir)/data/ontologies -o ontology.dot
 
 ontology.png: ontology.dot
 	$(AM_V_GEN)$(GRAPHVIZ_FDP) -Tpng -o $(top_srcdir)/docs/reference/ontology/ontology.png ontology.dot
 
-BUILT_SOURCES = gen-doc.stamp
+BUILT_SOURCES = 							\
+	ontology.png							\
+	gen-doc.stamp
 
-EXTRA_DIST = 			\
-	gen-doc.sh		\
+EXTRA_DIST = 								\
+	gen-doc.sh							\
 	$(BUILT_SOURCES)
 
 DISTCLEANFILES = ontology.dot
 CLEANFILES = $(BUILT_SOURCES)
 
-dist-hook: dist-check-graphviz ontology.dot ontology.png
+make-hook: ontology.dot ontology.png



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