summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-10-28 08:27:48 +0100
committerJim Meyering <meyering@redhat.com>2009-10-28 18:07:22 +0100
commitce22916610d24bf29675a6761df957371b0b2376 (patch)
treeb3914bf6678255bbe78d36f741b9f1ff16c18211 /doc
parentda17f99b200723ad216907f7b6eacc39598530bf (diff)
downloadcoreutils-ce22916610d24bf29675a6761df957371b0b2376.tar.xz
build: make doc checks more user-friendly
* doc/Makefile.am (check-texinfo): Begin moving each individual test into its own rules. (sc-avoid-builtin, sc-avoid-path): New rules. Extracted from check-texinfo. (syntax_checks): Add them.
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.am15
1 files changed, 13 insertions, 2 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index be610a276..224bcd8fc 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -48,8 +48,10 @@ _W = (^|[^A-Za-z0-9_])
W_ = ([^A-Za-z0-9_]|$$)
syntax_checks = \
+ sc-avoid-builtin \
sc-avoid-io \
sc-avoid-non-zero \
+ sc-avoid-path \
sc-avoid-timezone \
sc-avoid-zeroes \
sc-exponent-grouping \
@@ -70,9 +72,18 @@ check-texinfo: $(syntax_checks)
$(PERL) -e 1 2> /dev/null && { $(PERL) -ne \
'/\bPOSIX\b/ && !/\@acronym{POSIX}/ && !/^\* / || /{posix}/ and print,exit 1' \
$(srcdir)/*.texi 2> /dev/null || fail=1; }; \
- $(EGREP) -i '$(_W)builtins?$(W_)' $(srcdir)/*.texi && fail=1; \
+ exit $$fail
+
+sc-avoid-builtin:
+ $(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(srcdir)/*.texi \
+ && exit 1 || :
+
+sc-avoid-path:
+ $(AM_V_GEN)fail=0; \
$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(srcdir)/*.texi \
- | $(EGREP) -v 'search path|@vindex PATH$$|@env[{]PATH[}]' && fail=1; \
+ | $(EGREP) -v \
+ 'PATH=|path search|search path|@vindex PATH$$|@env[{]PATH[}]' \
+ && fail=1; \
exit $$fail
# Use `time zone', not `timezone'.