diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-05-26 17:27:20 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-05-26 17:27:20 +0100 |
commit | 1b5d0af55ede724f9e5bff7e2e8bf98b22eeb6da (patch) | |
tree | ee9ccea80374fd9dd05d8e0833fbfdae0c8d7c64 /doc | |
parent | 0285cf42d28d2af0aa727ed11cbfdb57eb50faed (diff) |
Add infrastructure for documentation completeness checking, but leave it disabled
Diffstat (limited to 'doc')
-rw-r--r-- | doc/reference/mission-control-plugins/Makefile.am | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/doc/reference/mission-control-plugins/Makefile.am b/doc/reference/mission-control-plugins/Makefile.am index af0963f4..6a7a4770 100644 --- a/doc/reference/mission-control-plugins/Makefile.am +++ b/doc/reference/mission-control-plugins/Makefile.am @@ -88,3 +88,52 @@ clean-local: clean-mcp # we actually treat all of these as disposable, in this "book" clean-mcp: rm -fr *.txt *.types + +# this will be enabled in a future release +ENABLE_DOC_CHECKS = no + +if ENABLE_GTK_DOC +check-local: + @err=0; \ + echo "Checking for undocumented symbols..."; \ + if grep '^0 symbols incomplete' \ + $(srcdir)/$(DOC_MODULE)-undocumented.txt && \ + grep '^0 not documented' \ + $(srcdir)/$(DOC_MODULE)-undocumented.txt; then\ + :; \ + else \ + cat $(srcdir)/$(DOC_MODULE)-undocumented.txt; \ + err=1; \ + fi; \ + echo "Checking for unused symbols..."; \ + if grep . $(srcdir)/$(DOC_MODULE)-unused.txt; then\ + echo "^^^ Unused symbols" >&2; \ + err=1; \ + fi; \ + echo "Checking for undeclared symbols..."; \ + if test -e $(srcdir)/$(DOC_MODULE)-undeclared.txt &&\ + grep . $(srcdir)/$(DOC_MODULE)-undeclared.txt; then\ + echo "^^^ Undeclared symbols" >&2; \ + err=1; \ + fi; \ + sed -n -e 's,<FILE>\(.*\)</FILE>,\1,p' $(srcdir)/$(DOC_MODULE)-sections.txt |\ + while read file; do \ + if grep -F "xml/$$file.xml" $(srcdir)/$(DOC_MODULE)-docs.sgml \ + >/dev/null;\ + then \ + :; \ + else \ + echo "$$file missing from $(DOC_MODULE)-docs.sgml"; \ + err=1; \ + fi; \ + done; \ + case $(ENABLE_DOC_CHECKS)/$$err in \ + (yes/1) \ + echo "Documentation check failed" >&2; \ + exit $$err; \ + ;; \ + (*) \ + exit 0; \ + ;; \ + esac +endif |