From ce22916610d24bf29675a6761df957371b0b2376 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 28 Oct 2009 08:27:48 +0100 Subject: [PATCH] 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. --- doc/Makefile.am | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index be610a2..224bcd8 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'. -- 2.7.4