summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2012-09-26 01:17:07 +0900
committerJavier Jardón <javier.jardon@codethink.co.uk>2013-03-04 12:43:49 +0000
commit8a2a9f9db169eaaf2a7eede18e0ceba0af44345f (patch)
treef493093b6d2b6c27f18c3978448cbb7e1c7cbd9f
parent8988db665aa7bcc0d3d2cd38f55abccd33cbd67a (diff)
downloadgobject-introspection-baserock/morph.tar.gz
Make gtk-doc not a hard dependency of gobject-introspectionbaserock/morph
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=684795
-rwxr-xr-xautogen.sh13
-rw-r--r--configure.ac8
-rw-r--r--docs/Makefile.am2
3 files changed, 18 insertions, 5 deletions
diff --git a/autogen.sh b/autogen.sh
index 0eac5f59..51f51c40 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -7,10 +7,16 @@ 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
+ cat > gtk-doc.make <<EOF
+EXTRA_DIST =
+CLEANFILES =
+EOF
+else
+ gtkdocize || exit $?
fi
AUTORECONF=`which autoreconf`
@@ -19,7 +25,6 @@ if test -z $AUTORECONF; then
exit 1
fi
-gtkdocize || exit $?
autoreconf --force --install --verbose || exit $?
cd "$olddir"
diff --git a/configure.ac b/configure.ac
index e7a7abc2..b67c0953 100644
--- a/configure.ac
+++ b/configure.ac
@@ -233,7 +233,13 @@ GIREPO_CFLAGS="$GIREPO_CFLAGS $FFI_CFLAGS"
GIREPO_CFLAGS="$GIREPO_CFLAGS $GCOV_CFLAGS"
# gtk-doc
-GTK_DOC_CHECK([1.15],[--flavour no-tmpl])
+# 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])
+])
# Checks for header files.
AC_HEADER_STDC
diff --git a/docs/Makefile.am b/docs/Makefile.am
index f3ddc22d..d2162476 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -1 +1,3 @@
+if ENABLE_GTK_DOC
SUBDIRS = reference
+endif