[gtk-doc] tests: add an empty project where we even regenerate the tester-docs.xml



commit 39c2c833deb9939dac12355e6258e7ad23c29500
Author: Stefan Kost <ensonic users sf net>
Date:   Sun Jan 3 14:58:09 2010 +0200

    tests: add an empty project where we even regenerate the tester-docs.xml

 configure.ac                 |    3 +
 tests/Makefile.am            |    4 +-
 tests/empty.sh               |    4 ++
 tests/empty/Makefile.am      |   12 ++++++
 tests/empty/docs/Makefile.am |   85 ++++++++++++++++++++++++++++++++++++++++++
 tests/empty/src/Makefile.am  |   15 +++++++
 tests/empty/src/tester.c     |   23 +++++++++++
 tests/empty/src/tester.h     |   10 +++++
 8 files changed, 154 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 33dbd70..c2a90e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -199,6 +199,9 @@ tests/annotations/docs/Makefile
 tests/fail/Makefile
 tests/fail/src/Makefile
 tests/fail/docs/Makefile
+tests/empty/Makefile
+tests/empty/src/Makefile
+tests/empty/docs/Makefile
 ])
 
 dnl run chmod on these after parsing them.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d4c94ec..aba664a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,10 +1,10 @@
 ## Process this file with automake to produce Makefile.in
 
-SUBDIRS = gobject bugs annotations fail .
+SUBDIRS = gobject bugs annotations fail empty .
 
 if BUILD_TESTS
 
-TESTS = tools.sh gobject.sh bugs.sh annotations.sh fail.sh
+TESTS = tools.sh gobject.sh bugs.sh annotations.sh fail.sh empty.sh
 TESTS_ENVIRONMENT = \
 	ABS_TOP_BUILDDIR=$(abs_top_builddir) \
 	PATH=$(abs_top_builddir):$(srcdir):$(PATH) \
diff --git a/tests/empty.sh b/tests/empty.sh
new file mode 100755
index 0000000..9f54325
--- /dev/null
+++ b/tests/empty.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+gtkdoctest.sh empty
+
diff --git a/tests/empty/Makefile.am b/tests/empty/Makefile.am
new file mode 100644
index 0000000..ad34ec6
--- /dev/null
+++ b/tests/empty/Makefile.am
@@ -0,0 +1,12 @@
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = . src docs
+
+if BUILD_TESTS
+
+check-local: clean
+
+endif
+
+
+-include $(top_srcdir)/git.mk
diff --git a/tests/empty/docs/Makefile.am b/tests/empty/docs/Makefile.am
new file mode 100644
index 0000000..562af19
--- /dev/null
+++ b/tests/empty/docs/Makefile.am
@@ -0,0 +1,85 @@
+## Process this file with automake to produce Makefile.in
+
+# We require automake 1.6 at least.
+AUTOMAKE_OPTIONS = 1.6
+
+# The name of the module, e.g. 'glib'.
+DOC_MODULE=tester
+
+# The top-level SGML file. You can change this if you want to.
+DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
+
+# 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.
+DOC_SOURCE_DIR=$(top_srcdir)/tests/empty/src
+
+# Extra options to pass to gtkdoc-scangobj. Not normally needed.
+SCANGOBJ_OPTIONS=2>&1 | tee gtkdoc-scangobj.log
+
+# Extra options to supply to gtkdoc-scan.
+SCAN_OPTIONS=--deprecated-guards="GTKDOC_TESTER_DISABLE_DEPRECATED" \
+  --rebuild-sections \
+  2>&1 | tee gtkdoc-scan.log
+
+# Extra options to supply to gtkdoc-mkdb.
+MKDB_OPTIONS=--sgml-mode 2>&1 | tee gtkdoc-mkdb.log
+
+# Extra options to supply to gtkdoc-mktmpl
+# e.g. MKTMPL_OPTIONS=--only-section-tmpl
+MKTMPL_OPTIONS=2>&1 | tee gtkdoc-mktmpl.log
+
+# Extra options to supply to gtkdoc-mkhtml
+MKHTML_OPTIONS=2>&1 | tee ../gtkdoc-mkhtml.log
+
+# Extra options to supply to gtkdoc-fixref. Not normally needed.
+# --html-dir=$(HTML_DIR)
+FIXXREF_OPTIONS=--extra-dir=$(glib_prefix)/share/gtk-doc/html 2>&1 | tee gtkdoc-fixxref.log
+
+# Used for dependencies. The docs will be rebuilt if any of these change.
+HFILE_GLOB=$(top_srcdir)/tests/empty/src/*.h
+CFILE_GLOB=$(top_srcdir)/tests/empty/src/*.c
+
+# Header files to ignore when scanning.
+IGNORE_HFILES=config.h
+
+# Images to copy into HTML directory.
+HTML_IMAGES = $(top_srcdir)/home.png
+
+# 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.
+GTKDOC_CFLAGS = -I$(top_srcdir)/tests/empty/src $(TEST_DEPS_CFLAGS)
+GTKDOC_LIBS = $(TEST_DEPS_LIBS) $(top_builddir)/tests/empty/src/libtester.la
+
+# include generic part
+include $(top_srcdir)/tests/gtk-doc.notmpl.make
+
+# Other files to distribute
+# e.g. EXTRA_DIST += version.xml.in
+EXTRA_DIST +=
+
+DISTCLEANFILES = \
+	gtkdoc-scan.log \
+	gtkdoc-scangobj.log \
+	gtkdoc-mktmpl.log \
+	gtkdoc-mkdb.log \
+	gtkdoc-mkhtml.log \
+	gtkdoc-fixxref.log
+
+if BUILD_TESTS
+TESTS_ENVIRONMENT = \
+	PATH=$(abs_top_builddir):$(srcdir):$(PATH) \
+	PERL5LIB=$(abs_top_builddir):$(PERL5LIB)
+endif
+
+-include $(top_srcdir)/git.mk
diff --git a/tests/empty/src/Makefile.am b/tests/empty/src/Makefile.am
new file mode 100644
index 0000000..77f9241
--- /dev/null
+++ b/tests/empty/src/Makefile.am
@@ -0,0 +1,15 @@
+## Process this file with automake to produce Makefile.in
+
+if BUILD_TESTS
+
+noinst_LTLIBRARIES = libtester.la
+
+libtester_la_SOURCES = tester.c tester.h
+#libtester_la_LIBADD = $(TEST_DEPS_LIBS)
+
+AM_CPPFLAGS = $(TEST_DEPS_CFLAGS)
+
+endif
+
+
+-include $(top_srcdir)/git.mk
diff --git a/tests/empty/src/tester.c b/tests/empty/src/tester.c
new file mode 100644
index 0000000..e8d4dee
--- /dev/null
+++ b/tests/empty/src/tester.c
@@ -0,0 +1,23 @@
+/**
+ * SECTION:tester
+ * @short_description: module for gtk-doc unit test
+ *
+ * This file contains non-sense code for the sole purpose of testing the docs.
+ *
+ * As described in http://bugzilla.gnome.org/show_bug.cgi?id=457077 it
+ * returns nothing.
+ */
+
+#include <glib.h>
+
+#include "tester.h"
+
+/**
+ * test:
+ * @a: arg
+ *
+ * lonely function
+ */
+void test (gint a) {
+}
+
diff --git a/tests/empty/src/tester.h b/tests/empty/src/tester.h
new file mode 100644
index 0000000..d204b74
--- /dev/null
+++ b/tests/empty/src/tester.h
@@ -0,0 +1,10 @@
+#ifndef GTKDOC_TESTER_H
+#define GTKDOC_TESTER_H
+
+#include <glib.h>
+
+
+void test (gint a);
+
+#endif // GTKDOC_TESTER_H
+



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