[couchdb-glib: 2/21] The skeleton for generating gtk-doc is working.



commit 0dbff192648d0c39ade1dd2a6cd3917039fa3935
Author: Mikkel Kamstrup Erlandsen <mikkel kamstrup gmail com>
Date:   Sat Oct 3 14:57:25 2009 +0200

    The skeleton for generating gtk-doc is working.
    Still only stub docs because of the non-standard
    source layout of GObject .c/.h files.
    
    Miraculously distcheck is still passing :-)

 Makefile.am                          |    4 ++-
 configure.ac                         |    9 +++++
 doc/Makefile.am                      |    4 ++
 doc/reference/Makefile.am            |   67 ++++++++++++++++++++++++++++++++++
 doc/reference/couchdb-glib-docs.sgml |   14 +++++++
 doc/reference/couchdb-glib.types     |    3 ++
 6 files changed, 100 insertions(+), 1 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 3aee7a9..c466442 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,6 @@
-SUBDIRS = couchdb-glib tests
+SUBDIRS = couchdb-glib tests doc
+
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
 
 pcfiles = couchdb-glib-1.0.pc
 
diff --git a/configure.ac b/configure.ac
index a7ca497..3813b78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,11 +43,20 @@ AC_SUBST(LIBCOUCHDBGLIB_CURRENT)
 AC_SUBST(LIBCOUCHDBGLIB_REVISION)
 AC_SUBST(LIBCOUCHDBGLIB_AGE)
 
+##################################################
+# Check for gtk-doc.
+##################################################
+GTK_DOC_CHECK(1.0)
+DISTCHECK_CONFIGURE_FLAGS="--enable-gtk-doc"
+AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
+
 AC_OUTPUT([
 Makefile
 couchdb-glib.pc
 couchdb-glib/Makefile
 tests/Makefile
+doc/Makefile
+doc/reference/Makefile
 ])
 
 AC_MSG_NOTICE([
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..b858168
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,4 @@
+# Include to make 'make check' work with GTest
+#include $(top_srcdir)/Makefile.decl
+
+SUBDIRS = reference
diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am
new file mode 100644
index 0000000..5cb843a
--- /dev/null
+++ b/doc/reference/Makefile.am
@@ -0,0 +1,67 @@
+## Process this file with automake to produce Makefile.in
+
+# Dummy targets we need to make distcheck and check pass
+test test-report perf-report full-report:
+	## Ignore
+
+# automake requirements
+AUTOMAKE_OPTIONS = 1.7
+
+# The name of the module
+DOC_MODULE=couchdb-glib
+
+# 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).
+DOC_SOURCE_DIR=../..
+
+# Extra options to pass to gtkdoc-scangobj. Not normally needed.
+SCANGOBJ_OPTIONS=
+
+# Extra options to supply to gtkdoc-scan.
+# Fx --rebuild-types --rebuild-sections
+SCAN_OPTIONS=
+
+# Extra options to supply to gtkdoc-mkdb.
+MKDB_OPTIONS=--sgml-mode --output-format=xml --ignore-files=trio
+
+# Extra options to supply to gtkdoc-fixref. Not normally needed.
+FIXXREF_OPTIONS=
+
+# Used for dependencies. The docs will be rebuilt if any of these change.
+HFILE_GLOB=$(top_srcdir)/couchdb-glib/couchdb*.h
+CFILE_GLOB=$(top_srcdir)/couchdb-glib/couchdb*.c
+
+# Header files to ignore when scanning.
+IGNORE_HFILES=		\
+	xmalloc.h		\
+	dbwatch.h		\
+	oauth.h			\
+	utils.h			\
+	xmalloc.h		\
+	config.h
+
+# Images to copy into HTML directory.
+HTML_IMAGES=
+
+# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
+content_files = 
+
+# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
+INCLUDES=-I$(top_srcdir)/couchdb-glib   \
+         $(COUCHDB_GLIB_CFLAGS)
+
+GTKDOC_LIBS=$(COUCHDB_GLIB_LIBS) \
+            $(top_builddir)/couchdb-glib/libcouchdb-glib-1.0.la
+
+# 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 += \
+	couchdb-glib.types        \
+	couchdb-glib-docs.sgml
+#	couchdb-glib-sections.txt
+
diff --git a/doc/reference/couchdb-glib-docs.sgml b/doc/reference/couchdb-glib-docs.sgml
new file mode 100644
index 0000000..f923206
--- /dev/null
+++ b/doc/reference/couchdb-glib-docs.sgml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
+               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd";>
+<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude";>
+  <bookinfo>
+    <title>Reference Manual for CouchDB GLib Bindings</title>
+  </bookinfo>
+
+  <chapter>
+    <title>Core API</title>
+    <xi:include href="xml/couchdb-glib.xml"/>
+  </chapter>
+
+</book>
diff --git a/doc/reference/couchdb-glib.types b/doc/reference/couchdb-glib.types
new file mode 100644
index 0000000..cb47ede
--- /dev/null
+++ b/doc/reference/couchdb-glib.types
@@ -0,0 +1,3 @@
+couchdb_get_type
+couchdb_document_get_type
+



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