summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2007-11-24 01:43:45 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2007-11-24 01:43:45 +0000
commitde2b040b9d970856e56c44e66ebcf61af002ce89 (patch)
tree2a35980175b9699b981edbc58cc36cb2014db235 /docs
parent476aa983d87f84adda61d271af9a67839df4f05a (diff)
downloadpango-de2b040b9d970856e56c44e66ebcf61af002ce89.tar.gz
Make it reusable by not hardcoding "pango".
2007-11-23 Behdad Esfahbod <behdad@gnome.org> * docs/check.docs: Make it reusable by not hardcoding "pango". svn path=/trunk/; revision=2504
Diffstat (limited to 'docs')
-rwxr-xr-xdocs/check.docs28
1 files changed, 19 insertions, 9 deletions
diff --git a/docs/check.docs b/docs/check.docs
index db6297c8..cdc31628 100755
--- a/docs/check.docs
+++ b/docs/check.docs
@@ -1,28 +1,38 @@
#!/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 pango-undocumented.txt -a -f pango-unused.txt; then
- echo At least one of pango-undocumented.txt and pango-unused.txt not found.
+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 pango-unused.txt`
+unused=`cat "$DOC_MODULE-unused.txt"`
if test -n "$unused"; then
- echo Unused documentated symbols:
- cat pango-unused.txt
+ echo Unused documentated symbols: 1>&2
+ cat "$DOC_MODULE-unused.txt" 1>&2
status=1
fi
-if ! grep '^0 symbols incomplete' pango-undocumented.txt >/dev/null ||
- ! grep '^0 not documented' pango-undocumented.txt >/dev/null; then
- echo Incomplete or undocumented symbols:
- cat pango-undocumented.txt
+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