[gtk-doc] docbuild: use --copy during bootstrap, make doc uild more conditional



commit e6f1f5494bfd077fcea8f2f1cdbb97464a34c140
Author: Stefan Kost <ensonic users sf net>
Date:   Mon Apr 20 15:52:28 2009 +0300

    docbuild: use --copy during bootstrap, make doc uild more conditional
    
    Using --copy for gnome-doc-prepare ensure we don't commit symlinks to the repo.
    Furthermore we make manual subdir conditional for HAVE_GNOME_DOC_UTILS.
---
 autogen.sh            |    3 +-
 help/Makefile.am      |    3 ++
 m4/gnome-doc-utils.m4 |   53 ++++++++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index bd42613..a8771a8 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -67,9 +67,10 @@ fi
 
 if gnome-doc-prepare --version < /dev/null > /dev/null 2>&1; then
   echo "* Running gnome-doc-prepare"
-  gnome-doc-prepare --force --automake
+  gnome-doc-prepare --copy --force --automake
 else
   CONFIGURE_FLAGS="$CONFIGURE_FLAGS --disable-scrollkeeper"
+  touch gnome-doc-utils.make
 fi
 
 # to support timj aclocal setup we are shipping gnome-doc-utils.m4
diff --git a/help/Makefile.am b/help/Makefile.am
index 4cfd92e..877fed8 100644
--- a/help/Makefile.am
+++ b/help/Makefile.am
@@ -1,3 +1,6 @@
 ## Process this file with automake to produce Makefile.in
 
+if HAVE_GNOME_DOC_UTILS
 SUBDIRS = manual
+endif
+
diff --git a/m4/gnome-doc-utils.m4 b/m4/gnome-doc-utils.m4
deleted file mode 120000
index f471572..04f79bb
--- a/m4/gnome-doc-utils.m4
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/aclocal/gnome-doc-utils.m4
\ No newline at end of file
diff --git a/m4/gnome-doc-utils.m4 b/m4/gnome-doc-utils.m4
new file mode 100644
index f471572..04f79bb
--- /dev/null
+++ b/m4/gnome-doc-utils.m4
@@ -0,0 +1,52 @@
+dnl Do not call GNOME_DOC_DEFINES directly.  It is split out from
+dnl GNOME_DOC_INIT to allow gnome-doc-utils to bootstrap off itself.
+AC_DEFUN([GNOME_DOC_DEFINES],
+[
+AC_ARG_WITH([help-dir],
+  AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
+  [with_help_dir='${datadir}/gnome/help'])
+HELP_DIR="$with_help_dir"
+AC_SUBST(HELP_DIR)
+
+AC_ARG_WITH([omf-dir],
+  AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),,
+  [with_omf_dir='${datadir}/omf'])
+OMF_DIR="$with_omf_dir"
+AC_SUBST(OMF_DIR)
+
+AC_ARG_WITH([help-formats],
+  AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),,
+  [with_help_formats=''])
+DOC_USER_FORMATS="$with_help_formats"
+AC_SUBST(DOC_USER_FORMATS)
+
+AC_ARG_ENABLE([scrollkeeper],
+	[AC_HELP_STRING([--disable-scrollkeeper],
+			[do not make updates to the scrollkeeper database])],,
+	enable_scrollkeeper=yes)
+AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"])
+
+dnl disable scrollkeeper automatically for distcheck
+DISTCHECK_CONFIGURE_FLAGS="--disable-scrollkeeper $DISTCHECK_CONFIGURE_FLAGS"
+AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
+
+AM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"])
+])
+
+# GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
+#
+AC_DEFUN([GNOME_DOC_INIT],
+[
+ifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1])
+
+PKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required],
+	[gdu_cv_have_gdu=yes],[gdu_cv_have_gdu=no])
+
+if test "$gdu_cv_have_gdu" = "yes"; then
+	ifelse([$2],,[:],[$2])
+else
+	ifelse([$3],,[AC_MSG_ERROR([gnome-doc-utils >= $gdu_cv_version_required not found])],[$3])
+fi
+
+GNOME_DOC_DEFINES
+])



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