[glib] Make gtk-doc not a hard dependency of GLib
- From: Javier JardÃn <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Make gtk-doc not a hard dependency of GLib
- Date: Sun, 5 Aug 2012 13:35:23 +0000 (UTC)
commit 0f6a092cc5a1cc82a02b23e9daa15159319f929c
Author: Javier JardÃn <jjardon gnome org>
Date: Tue Apr 17 12:59:11 2012 +0100
Make gtk-doc not a hard dependency of GLib
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=674314
autogen.sh | 10 ++++++----
configure.ac | 7 ++++++-
docs/Makefile.am | 2 ++
3 files changed, 14 insertions(+), 5 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 01011d9..892b57b 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -7,10 +7,13 @@ test -n "$srcdir" || srcdir=.
olddir=`pwd`
cd "$srcdir"
-GTKDOCIZE=`which gtkdocize`
+GTKDOCIZE=$(which gtkdocize 2>/dev/null)
if test -z $GTKDOCIZE; then
- echo "*** No GTK-Doc found, please install it ***"
- exit 1
+ echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation."
+ rm -f gtk-doc.make
+ echo 'EXTRA_DIST =' > gtk-doc.make
+else
+ gtkdocize || exit $?
fi
AUTORECONF=`which autoreconf`
@@ -24,7 +27,6 @@ fi
# regenerated from their corresponding *.in files by ./configure anyway.
touch README INSTALL
-gtkdocize || exit $?
autoreconf --force --install --verbose || exit $?
cd "$olddir"
diff --git a/configure.ac b/configure.ac
index 93d0f30..c39f6a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2585,8 +2585,13 @@ AS_IF([ test $cross_compiling = yes && test x$enable_modular_tests = xyes], [
dnl **************************
dnl *** Checks for gtk-doc ***
dnl **************************
-
+# gtkdocize greps for ^GTK_DOC_CHECK and parses it, so you need to have
+# it on it's own line.
+m4_ifdef([GTK_DOC_CHECK], [
GTK_DOC_CHECK([1.15], [--flavour no-tmpl])
+],[
+AM_CONDITIONAL([ENABLE_GTK_DOC],[false])
+])
AC_ARG_ENABLE(man,
[AC_HELP_STRING([--enable-man],
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 2349f44..03580e8 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -1,7 +1,9 @@
## Process this file with automake to produce Makefile.in
include $(top_srcdir)/Makefile.decl
+if ENABLE_GTK_DOC
SUBDIRS = reference
+endif
EXTRA_DIST += debugging.txt macros.txt
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]