[gnome-autoar] Add gtk-doc to the build system



commit 93e0064b82b8fc89bd3a011c6eccbd10ca30d50e
Author: Ting-Wei Lan <lantw44 gmail com>
Date:   Wed Sep 11 21:21:54 2013 +0800

    Add gtk-doc to the build system

 .gitignore                              |   20 +++++++++++++++++
 Makefile.am                             |    2 +-
 configure.ac                            |    8 ++++++-
 docs/Makefile.am                        |    1 +
 docs/reference/Makefile.am              |    1 +
 docs/reference/gnome-autoar/Makefile.am |   35 +++++++++++++++++++++++++++++++
 6 files changed, 65 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 009028c..94fe79c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,16 +2,21 @@
 *.o
 *.lo
 *.la
+*.stamp
 .deps
 .libs
 .*.sw[op]
 stamp-*
 
+cscope.out
+tags
+
 Makefile
 Makefile.in
 aclocal.m4
 autom4te.cache
 autoscan.log
+compile
 config.guess
 config.h
 config.h.in
@@ -21,11 +26,13 @@ config.sub
 configure
 configure.scan
 depcomp
+gtk-doc.make
 install-sh
 libtool
 ltmain.sh
 m4/*.m4
 missing
+gnome-autoar-*.tar.*
 
 gnome-autoar/*-enum-types.[ch]
 gnome-autoar/gnome-autoar.pc
@@ -34,5 +41,18 @@ data/*.enums.xml
 data/*.gschema.valid
 
 tests/test-extract
+tests/test-extract-memory
 tests/test-create
 tests/test-pref
+tests/test-ui
+
+docs/reference/gnome-autoar/html
+docs/reference/gnome-autoar/xml
+docs/reference/gnome-autoar/*.args
+docs/reference/gnome-autoar/*.hierarchy
+docs/reference/gnome-autoar/*.interfaces
+docs/reference/gnome-autoar/*.prerequisites
+docs/reference/gnome-autoar/*.signals
+docs/reference/gnome-autoar/*.txt
+docs/reference/gnome-autoar/*.types
+docs/reference/gnome-autoar/gnome-autoar-docs.xml
diff --git a/Makefile.am b/Makefile.am
index 836d1c1..505166f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,7 +4,7 @@ ACLOCAL_AMFLAGS = -I m4
 
 NULL =
 
-SUBDIRS = gnome-autoar data tests
+SUBDIRS = gnome-autoar data tests docs
 
 EXTRA_DISTS = \
        autogen.sh \
diff --git a/configure.ac b/configure.ac
index 01474e8..d8af50b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,9 @@ AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
 AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
 AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources)
 
+# check for gtk-doc
+GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
+
 # Checks for libraries.
 GLIB_REQUIRED=2.35.6
 GTK_REQUIRED=3.2
@@ -59,7 +62,10 @@ AC_CONFIG_FILES([Makefile
                  gnome-autoar/Makefile
                  gnome-autoar/gnome-autoar.pc
                  data/Makefile
-                 tests/Makefile])
+                 tests/Makefile
+                 docs/Makefile
+                 docs/reference/Makefile
+                 docs/reference/gnome-autoar/Makefile])
 AC_OUTPUT
 
 echo "
diff --git a/docs/Makefile.am b/docs/Makefile.am
new file mode 100644
index 0000000..f3ddc22
--- /dev/null
+++ b/docs/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = reference
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
new file mode 100644
index 0000000..41a8d10
--- /dev/null
+++ b/docs/reference/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = gnome-autoar
diff --git a/docs/reference/gnome-autoar/Makefile.am b/docs/reference/gnome-autoar/Makefile.am
new file mode 100644
index 0000000..b820f07
--- /dev/null
+++ b/docs/reference/gnome-autoar/Makefile.am
@@ -0,0 +1,35 @@
+# vim: set sw=8 ts=8 sts=8 noet:
+
+NULL =
+
+# We require automake 1.6 at least.
+AUTOMAKE_OPTIONS = 1.6
+
+DOC_MODULE=gnome-autoar
+DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
+DOC_SOURCE_DIR=$(top_srcdir)/gnome-autoar
+MKDB_OPTIONS=--xml-mode --output-format=xml
+HFILE_GLOB=$(top_srcdir)/gnome-autoar/*.h
+CFILE_GLOB=$(top_srcdir)/gnome-autoar/*.c
+IGNORE_HFILES=$(top_srcdir)/gnome-autoar/autoar-enum-types.h
+IGNORE_CFILES=$(top_srcdir)/gnome-autoar/autoar-enum-types.c
+
+GTKDOC_CFLAGS = \
+       -I$(top_srcdir) \
+       -I$(DEPENDENCIES_CFLAGS) \
+       $(NULL)
+
+GTKDOC_LIBS = \
+       $(DEPENDENCIES_LIBS) \
+       $(top_builddir)/gnome-autoar/libgnome-autoar.la \
+       $(NULL)
+
+# This includes the standard gtk-doc make rules, copied by gtkdocize.
+include $(top_srcdir)/gtk-doc.make
+
+if ENABLE_GTK_DOC
+TESTS_ENVIRONMENT = cd $(srcdir) && \
+  DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
+  SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
+#TESTS = $(GTKDOC_CHECK)
+endif


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