summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2008-10-15 16:48:26 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2008-10-15 16:48:26 +0000
commit77518ec1de91234080a78baf2af8cc223ce7a63b (patch)
tree8cc9594a01a00fb14b7ab35a0c66805dd42257f6 /doc
parent921ab3aa61a4a7cfaa845523fbab77288822445d (diff)
Update doc coverage test from cairo.
2008-10-15 Behdad Esfahbod <behdad@gnome.org> * doc/reference/Makefile.am: * doc/reference/check-doc-coverage.sh: * doc/reference/check.docs: Update doc coverage test from cairo. svn path=/trunk/; revision=2122
Diffstat (limited to 'doc')
-rw-r--r--doc/reference/Makefile.am9
-rwxr-xr-xdoc/reference/check-doc-coverage.sh48
-rwxr-xr-xdoc/reference/check.docs39
3 files changed, 55 insertions, 41 deletions
diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am
index db4aa07..b69c930 100644
--- a/doc/reference/Makefile.am
+++ b/doc/reference/Makefile.am
@@ -65,6 +65,11 @@ MAINTAINERCLEANFILES = vte-undocumented.txt
include $(top_srcdir)/gtk-doc.make
-EXTRA_DIST += check.docs
+# This line really belongs in gtk-doc.mk
+$(REPORT_FILES): sgml-build.stamp
-TESTS = check.docs
+if ENABLE_GTK_DOC
+TESTS = check-doc-coverage.sh
+endif
+
+EXTRA_DIST += check-doc-coverage.sh
diff --git a/doc/reference/check-doc-coverage.sh b/doc/reference/check-doc-coverage.sh
new file mode 100755
index 0000000..2898fc5
--- /dev/null
+++ b/doc/reference/check-doc-coverage.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+LANG=C
+if test -z "$DOC_MODULE"; then
+ # extract from Makefile
+ eval `grep '^DOC_MODULE' Makefile | sed 's/ //g'`
+ if test -z "$DOC_MODULE"; then
+ echo Failed extracting DOC_MODULE from Makefile 1>&2
+ echo Try setting DOC_MODULE env var manually 1>&2
+ exit 1
+ fi
+fi
+
+if test -n "$REPORT_FILES"; then
+ $MAKE $REPORT_FILES || exit 1
+fi
+
+test -z "$srcdir" && srcdir=.
+stat=0
+
+if test -f "$DOC_MODULE-undeclared.txt"; then
+ undeclared=`cat "$DOC_MODULE-undeclared.txt"`
+ if test -n "$undeclared"; then
+ echo Undeclared documentation symbols: 1>&2
+ cat "$DOC_MODULE-undeclared.txt" 1>&2
+ stat=1
+ fi
+fi >&2
+if test -f "$DOC_MODULE-unused.txt"; then
+ unused=`cat "$DOC_MODULE-unused.txt"`
+ if test -n "$unused"; then
+ echo Unused documentated symbols: 1>&2
+ cat "$DOC_MODULE-unused.txt" 1>&2
+ stat=1
+ fi
+fi >&2
+if test -f "$DOC_MODULE-undocumented.txt"; then
+ if grep '^0 symbols incomplete' "$DOC_MODULE-undocumented.txt" >/dev/null &&
+ grep '^0 not documented' "$DOC_MODULE-undocumented.txt" >/dev/null; then
+ :
+ else
+ echo Incomplete or undocumented symbols: 1>&2
+ cat "$DOC_MODULE-undocumented.txt" 1>&2
+ stat=1
+ fi
+fi >&2
+
+exit $stat
diff --git a/doc/reference/check.docs b/doc/reference/check.docs
deleted file mode 100755
index cdc3162..0000000
--- a/doc/reference/check.docs
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-
-LANG=C
-if test -z "$DOC_MODULE"; then
- # extract from Makefile
- eval `grep '^DOC_MODULE' Makefile | sed 's/ //g'`
- if test -z "$DOC_MODULE"; then
- echo Failed extracting DOC_MODULE from Makefile 1>&2
- echo Try setting DOC_MODULE env var manually 1>&2
- exit 1
- fi
-fi
-
-
-test -z "$srcdir" && srcdir=.
-status=0
-
-if ! test -f "$DOC_MODULE-undocumented.txt" -a -f "$DOC_MODULE-unused.txt"; then
- echo At least one of "$DOC_MODULE-undocumented.txt" and "$DOC_MODULE-unused.txt" not found.
- echo Skipping test.
- exit 0
-fi
-
-status=0
-
-unused=`cat "$DOC_MODULE-unused.txt"`
-if test -n "$unused"; then
- echo Unused documentated symbols: 1>&2
- cat "$DOC_MODULE-unused.txt" 1>&2
- status=1
-fi
-if ! grep '^0 symbols incomplete' "$DOC_MODULE-undocumented.txt" >/dev/null ||
- ! grep '^0 not documented' "$DOC_MODULE-undocumented.txt" >/dev/null; then
- echo Incomplete or undocumented symbols: 1>&2
- cat "$DOC_MODULE-undocumented.txt" 1>&2
- status=1
-fi
-
-exit $status