summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2004-11-03 17:39:00 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2004-11-03 17:39:00 +0000
commit51bdc5fb8b7aa4e402259aad2bdb0eceb527a391 (patch)
tree3a992d1fe2e3ba91e8487dbb56f8aaede4619205 /doc
parent29f1f2906cba6d6e58515a122894ee314431676b (diff)
downloadcoreutils-51bdc5fb8b7aa4e402259aad2bdb0eceb527a391.tar.xz
(_W, W_): New macros.
(check-texinfo): Use them instead of assuming grep -w (which is not portable). Problem reported by Albert Chin.
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.am8
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index f138ad9f4..38fbbdddc 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -24,16 +24,20 @@ MAINTAINERCLEANFILES = constants.texi
$(DVIS): $(EXTRA_DIST)
$(INFO_DEPS): $(EXTRA_DIST)
+# Extended regular expressions to match word starts and ends.
+_W = (^|[^A-Za-z0-9_])
+W_ = ([^A-Za-z0-9_]|$$)
+
# List words/regexps here that should not appear in the texinfo documentation.
# E.g., use @sc{nul}, not `NUL'
# and use `time zone', not `timezone'.
check-texinfo:
fail=0; \
grep timezone $(srcdir)/*.texi && fail=1; \
- grep -w IO $(srcdir)/*.texi && fail=1; \
+ $(EGREP) '$(_W)IO$(W_)' $(srcdir)/*.texi && fail=1; \
grep non-zero $(srcdir)/*.texi && fail=1; \
grep '@url{' $(srcdir)/*.texi && fail=1; \
- grep -w NUL $(srcdir)/*.texi && fail=1; \
+ $(EGREP) '$(_W)NUL$(W_)' $(srcdir)/*.texi && fail=1; \
grep '\$$@"' $(srcdir)/*.texi && fail=1; \
grep -n '[^[:punct:]]@footnote' $(srcdir)/*.texi && fail=1; \
grep -n filename $(srcdir)/*.texi|grep -vE 'setfilename|{filename}' \