diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2007-11-24 01:47:07 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2007-11-24 01:47:07 +0000 |
commit | e2391dad4d18eb67a13d9fdc73b87044d7595b4c (patch) | |
tree | 0518e090373b5455230d5a0eeb534f279d41c881 /doc | |
parent | 63e502516a8f892bd7d987387f38361b423f6dcf (diff) |
Add script to check doc coverage is 100% on "make check".
2007-11-23 Behdad Esfahbod <behdad@gnome.org>
* doc/reference/Makefile.am:
* doc/reference/check.docs:
Add script to check doc coverage is 100% on "make check".
svn path=/trunk/; revision=1982
Diffstat (limited to 'doc')
-rw-r--r-- | doc/reference/Makefile.am | 4 | ||||
-rwxr-xr-x | doc/reference/check.docs | 39 |
2 files changed, 43 insertions, 0 deletions
diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am index 5eaf257..287b667 100644 --- a/doc/reference/Makefile.am +++ b/doc/reference/Makefile.am @@ -60,4 +60,8 @@ FIXXREF_OPTIONS= MAINTAINERCLEANFILES = vte-undocumented.txt +EXTRA_DIST = check.docs + +TESTS = check.docs + include $(top_srcdir)/gtk-doc.make diff --git a/doc/reference/check.docs b/doc/reference/check.docs new file mode 100755 index 0000000..cdc3162 --- /dev/null +++ b/doc/reference/check.docs @@ -0,0 +1,39 @@ +#!/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 |