summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuslan N. Marchenko <me@ruff.mobi>2020-04-23 23:54:18 +0200
committerAlexander Akulich <akulichalexander@gmail.com>2020-04-25 00:32:40 +0300
commitca7a513154df04d9d44e93856358ad4f93637e19 (patch)
tree3293629ed95e1f8edecd7083843401a8f2414038
parent64062d2f0119b89d15e7bb0e0f6fa54ec23ff7f8 (diff)
Make GTK Docs optional
-rwxr-xr-xautogen.sh2
-rw-r--r--configure.ac6
-rw-r--r--docs/Makefile.am2
-rw-r--r--docs/reference/Makefile.am2
4 files changed, 11 insertions, 1 deletions
diff --git a/autogen.sh b/autogen.sh
index 0d8e27d..76741cb 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
-gtkdocize || exit 1
+which gtkdocize && ( gtkdocize || exit 1 ) || echo "EXTRA_DIST = " > gtk-doc.make
if test -n "$AUTOMAKE"; then
: # don't override an explicit user request
diff --git a/configure.ac b/configure.ac
index 779e90c..000daf7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -278,7 +278,13 @@ dnl To be used by tests and examples
WOCKY_CFLAGS='-I${top_builddir} -I${top_srcdir}'
AC_SUBST(WOCKY_CFLAGS)
+# check for gtk-doc
+m4_ifdef([GTK_DOC_CHECK], [
GTK_DOC_CHECK([1.17],[--flavour no-tmpl])
+],[
+AM_CONDITIONAL([ENABLE_GTK_DOC], false)
+])
+
AC_OUTPUT( Makefile \
wocky/Makefile \
diff --git a/docs/Makefile.am b/docs/Makefile.am
index f3ddc22..d216247 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -1 +1,3 @@
+if ENABLE_GTK_DOC
SUBDIRS = reference
+endif
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 2e1b628..2e679bb 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -2,6 +2,7 @@
# We require automake 1.6 at least.
AUTOMAKE_OPTIONS = 1.6
+if ENABLE_GTK_DOC
# This is a blank Makefile.am for using gtk-doc.
# Copy this to your project's API docs directory and modify the variables to
@@ -101,3 +102,4 @@ DISTCLEANFILES = wocky-sections.txt wocky.types
# Comment this out if you want your docs-status tested during 'make check'
#TESTS = $(GTKDOC_CHECK)
+endif #ENABLE_GTK_DOC