2006-04-19 Mikael Hallendal <micke@imendio.com>
authorhallski <hallski>
Wed, 19 Apr 2006 14:30:59 +0000 (14:30 +0000)
committerhallski <hallski>
Wed, 19 Apr 2006 14:30:59 +0000 (14:30 +0000)
* configure.ac:
- Move back to use the GTK_DOC_CHECK() macro.

* docs/reference/Makefile.am:
- Updated to newer format from gtk-doc (old one failed distcheck with
  new auto*).

ChangeLog
configure.ac
docs/reference/Makefile.am

index 3c82f95b8e097172a3fb0878d92a6d4755805d8a..23634babc5d72b278d404973ec703f97b7fa7361 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-04-19  Mikael Hallendal  <micke@imendio.com>
+
+       * configure.ac:
+       - Move back to use the GTK_DOC_CHECK() macro.
+       
+       * docs/reference/Makefile.am:
+       - Updated to newer format from gtk-doc (old one failed distcheck with
+         new auto*).
+
 2006-04-19  Mikael Hallendal  <micke@imendio.com>
 
        * Landing a patch by Martyn Russell for Win32.
index 49594db6fc6daf06f2d1e7ee8d8a7c8ac72d0096..13faeace932b5e8c26517402bcf5018c600e8825 100644 (file)
@@ -100,18 +100,13 @@ AC_SUBST(HTML_DIR)
 AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
 
 gtk_doc_min_version=1.0
-if $GTKDOC ; then 
-  gtk_doc_version=`gtkdoc-mkdb --version`
-  AC_MSG_CHECKING([for gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
-  if perl <<EOF ; then
-    exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
-          ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
-EOF
-    AC_MSG_RESULT(yes)
-  else
-    AC_MSG_RESULT(no)
-    GTKDOC=false
-  fi
+AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
+if pkg-config --atleast-version=$gtk_doc_min_version gtk-doc; then
+  AC_MSG_RESULT(yes)
+  GTKDOC=true
+else
+  AC_MSG_RESULT(no)
+  GTKDOC=false
 fi
 
 dnl Let people disable the gtk-doc stuff.
@@ -128,7 +123,8 @@ if test x$enable_gtk_doc = xauto ; then
   fi
 fi
 
-AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
+dnl Gtk doc
+GTK_DOC_CHECK(1.0)
 
 dnl define a MAINT-like variable REBUILD which is set if Perl
 dnl and awk are found, so autogenerated sources can be rebuilt
index 2e434a72282c817f61dc89a65488cf00540318ab..536983a796ad50348a35fd3a542798dd58bb6ac5 100644 (file)
 ## Process this file with automake to produce Makefile.in
 
-# The name of the module.
+# We require automake 1.6 at least.
+AUTOMAKE_OPTIONS = 1.6
+
+# This is a blank Makefile.am for using gtk-doc.
+# Copy this to your project's API docs directory and modify the variables to
+# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
+# of using the various options.
+
+# The name of the module, e.g. 'glib'.
 DOC_MODULE=loudmouth
 
-# The top-level SGML file.
+# The top-level SGML file. You can change this if you want to.
 DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
 
-# The directory containing the source code. Relative to $(srcdir)
+# The directory containing the source code. Relative to $(srcdir).
+# gtk-doc will search all .c & .h files beneath here for inline comments
+# documenting the functions and macros.
+# e.g. DOC_SOURCE_DIR=../../../gtk
 DOC_SOURCE_DIR=../../loudmouth
 
-# Extra options to pass to gtkdoc-scangobj
+# Extra options to pass to gtkdoc-scangobj. Not normally needed.
 SCANGOBJ_OPTIONS=
 
-# Extra options to supply to gtkdoc-scan
-#SCAN_OPTIONS=--deprecated-guards="GTK_ENABLE_BROKEN|GTK_DISABLE_DEPRECATED" 
+# Extra options to supply to gtkdoc-scan.
+# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED" 
+SCAN_OPTIONS=
 
-# Extra options to supply to gtkdoc-mkdb
+# Extra options to supply to gtkdoc-mkdb.
+# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
 MKDB_OPTIONS=--sgml-mode --output-format=xml
 
-# Extra options to supply to gtkdoc-fixref
-#FIXXREF_OPTIONS=--extra-dir=../file-modules/html --extra-dir=../file-modules/html
+# Extra options to supply to gtkdoc-mktmpl
+# e.g. MKTMPL_OPTIONS=--only-section-tmpl
+MKTMPL_OPTIONS=
 
-# Used for dependencies
+# Extra options to supply to gtkdoc-fixref. Not normally needed.
+# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
+FIXXREF_OPTIONS=
+
+# Used for dependencies. The docs will be rebuilt if any of these change.
+# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
+# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
 HFILE_GLOB=$(top_srcdir)/loudmouth/*.h
 CFILE_GLOB=$(top_srcdir)/loudmouth/*.c
 
-# Header files to ignore when scanning
-IGNORE_HFILES= lm-internals.h lm-sha.h lm-parser.h loudmouth.h
-
-# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
-content_files =                
-
-# Other files to distribute
-extra_files =
-
-# CFLAGS and LDFLAGS for compiling scan program. Only needed
-# if $(DOC_MODULE).types is non-empty.
-GTKDOC_CFLAGS =                                        \
+# Header files to ignore when scanning.
+# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
+IGNORE_HFILES=lm-internals.h lm-sha.h lm-parser.h lm-sock.h lm-ssl-base.h lm-ssl-internals.h loudmouth.h
+
+# Images to copy into HTML directory.
+# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
+HTML_IMAGES=
+
+# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
+# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
+content_files=
+
+# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
+# These files must be listed here *and* in content_files
+# e.g. expand_content_files=running.sgml
+expand_content_files=
+
+# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
+# Only needed if you are using gtkdoc-scangobj to dynamically query widget
+# signals and properties.
+# e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
+# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
+INCLUDES=                                              \
        $(LOUDMOUTH_CFLAGS)                             \
        -DLM_COMPILATION                                \
        -I$(top_srcdir)                                 \
        -I$(top_builddir)/loudmouth
 
-GTKDOC_LIBS =                                          \
+GTKDOC_LIBS                                          \
        $(LOUDMOUTH_LIBS)                               \
        $(top_builddir)/loudmouth/libloudmouth.la
 
 
-GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
-GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
-
-
-####################################
-# Everything below here is generic #
-####################################
-
-# We set GPATH here; this gives us semantics for GNU make
-# which are more like other make's VPATH, when it comes to
-# whether a source that is a target of one rule is then
-# searched for in VPATH/GPATH.
-#
-GPATH = $(srcdir)
-
-TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
-
-EXTRA_DIST =                           \
-       $(content_files)                \
-       $(extra_files)                  \
-       $(DOC_MAIN_SGML_FILE)           \
-       $(DOC_MODULE).types             \
-       $(DOC_MODULE)-sections.txt      \
-       $(DOC_MODULE)-overrides.txt
-
-DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
-          $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
-
-SCANOBJ_FILES =                 \
-       $(DOC_MODULE).args       \
-       $(DOC_MODULE).hierarchy  \
-       $(DOC_MODULE).interfaces \
-       $(DOC_MODULE).prerequisites \
-       $(DOC_MODULE).signals
-
-if ENABLE_GTK_DOC
-all-local: html-build.stamp
-
-#### scan ####
-
-scan-build.stamp: $(HFILE_GLOB)
-       @echo '*** Scanning header files ***'
-       if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
-           CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
-       else \
-           cd $(srcdir) ; \
-           for i in $(SCANOBJ_FILES) ; do \
-               test -f $$i || touch $$i ; \
-           done \
-       fi
-       cd $(srcdir) && \
-         gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
-       touch scan-build.stamp
-
-$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
-       @true
-
-#### templates ####
-
-tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
-       @echo '*** Rebuilding template files ***'
-       cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
-       touch tmpl-build.stamp
-
-tmpl.stamp: tmpl-build.stamp
-       @true
-
-#### sgml ####
-
-sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
-       @echo '*** Building SGML ***'
-       cd $(srcdir) && \
-       gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) $(MKDB_OPTIONS)
-       touch sgml-build.stamp
-
-sgml.stamp: sgml-build.stamp
-       @true
-
-#### html ####
-
-html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
-       @echo '*** Building HTML ***'
-       rm -rf $(srcdir)/html 
-       mkdir $(srcdir)/html
-       cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
-       test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
-       @echo '-- Fixing Crossreferences' 
-       cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
-       touch html-build.stamp
-endif
-
-##############
-
-clean-local:
-       rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
-
-maintainer-clean-local: clean
-       cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
-
-if ENABLE_GTK_DOC
-install-data-local:
-       $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
-       (installfiles=`echo $(srcdir)/html/*`; \
-       if test "$$installfiles" = '$(srcdir)/html/*'; \
-       then echo '-- Nothing to install' ; \
-       else \
-         for i in $$installfiles; do \
-           echo '-- Installing '$$i ; \
-           $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
-         done; \
-         echo '-- Installing $(srcdir)/html/index.sgml' ; \
-         $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
-       fi)
-else
-install-data-local:
-endif
-
-#
-# Require gtk-doc when making dist
-#
-if ENABLE_GTK_DOC
-dist-check-gtkdoc:
-else
-dist-check-gtkdoc:
-       @echo "*** gtk-doc must be installed and enabled in order to make dist"
-#      @false
-endif
-
-dist-hook: dist-check-gtkdoc dist-hook-local
-       mkdir $(distdir)/tmpl
-       mkdir $(distdir)/xml
-       mkdir $(distdir)/html
-       -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
-       -cp $(srcdir)/xml/*.xml $(distdir)/xml
-       -cp $(srcdir)/html/* $(distdir)/html
-
-.PHONY : dist-hook-local
-
-
-
-
-
-
-
-
+# This includes the standard gtk-doc make rules, copied by gtkdocize.
+include $(top_srcdir)/gtk-doc.make
 
+# Other files to distribute
+# e.g. EXTRA_DIST += version.xml.in
+EXTRA_DIST +=