2006-08-18 03:58:17 +08:00
|
|
|
# Make coreutils documentation. -*-Makefile-*-
|
|
|
|
|
|
|
|
# Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2003, 2004, 2005,
|
|
|
|
# 2006 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
|
|
# 02110-1301, USA.
|
|
|
|
|
2001-06-16 19:08:17 +08:00
|
|
|
info_TEXINFOS = coreutils.texi
|
1996-06-17 02:47:30 +08:00
|
|
|
|
2006-08-18 04:55:32 +08:00
|
|
|
EXTRA_DIST = perm.texi getdate.texi constants.texi fdl.texi
|
1996-11-02 22:47:46 +08:00
|
|
|
|
1998-11-22 01:43:41 +08:00
|
|
|
# The following is necessary if the package name is 8 characters or longer.
|
|
|
|
# If the info documentation would be split into 10 or more separate files,
|
|
|
|
# then this is necessary even if the package name is 7 characters long.
|
|
|
|
#
|
|
|
|
# Tell makeinfo to put everything in a single info file: <package>.info.
|
|
|
|
# Otherwise, it would also generate files with names like <package>.info-[123],
|
|
|
|
# and those names all map to one 14-byte name (<package>.info-) on some crufty
|
1996-11-02 22:47:46 +08:00
|
|
|
# old systems.
|
2006-05-27 23:51:19 +08:00
|
|
|
AM_MAKEINFOFLAGS = --no-split
|
2001-05-20 16:21:05 +08:00
|
|
|
|
2003-04-04 23:22:05 +08:00
|
|
|
constants.texi: $(top_srcdir)/src/tail.c
|
2001-05-21 20:34:57 +08:00
|
|
|
LC_ALL=C \
|
|
|
|
sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
|
|
|
|
$(top_srcdir)/src/tail.c > t-$@
|
|
|
|
mv t-$@ $@
|
|
|
|
|
2003-04-04 23:22:05 +08:00
|
|
|
MAINTAINERCLEANFILES = constants.texi
|
2001-05-21 20:34:57 +08:00
|
|
|
|
|
|
|
$(DVIS): $(EXTRA_DIST)
|
|
|
|
$(INFO_DEPS): $(EXTRA_DIST)
|
|
|
|
|
2004-11-04 01:39:00 +08:00
|
|
|
# Extended regular expressions to match word starts and ends.
|
|
|
|
_W = (^|[^A-Za-z0-9_])
|
|
|
|
W_ = ([^A-Za-z0-9_]|$$)
|
|
|
|
|
2001-05-20 16:21:05 +08:00
|
|
|
# List words/regexps here that should not appear in the texinfo documentation.
|
2004-03-24 23:12:11 +08:00
|
|
|
# E.g., use @sc{nul}, not `NUL'
|
2006-07-08 13:31:59 +08:00
|
|
|
# Use `time zone', not `timezone'.
|
|
|
|
# Use `zeros', not `zeroes' (nothing wrong with `zeroes'. just be consistent).
|
2001-05-20 16:21:05 +08:00
|
|
|
check-texinfo:
|
2003-04-02 06:16:10 +08:00
|
|
|
fail=0; \
|
|
|
|
grep timezone $(srcdir)/*.texi && fail=1; \
|
2004-11-04 01:39:00 +08:00
|
|
|
$(EGREP) '$(_W)IO$(W_)' $(srcdir)/*.texi && fail=1; \
|
2003-04-11 03:32:23 +08:00
|
|
|
grep non-zero $(srcdir)/*.texi && fail=1; \
|
2004-07-02 23:18:43 +08:00
|
|
|
grep '@url{' $(srcdir)/*.texi && fail=1; \
|
2004-11-04 01:39:00 +08:00
|
|
|
$(EGREP) '$(_W)NUL$(W_)' $(srcdir)/*.texi && fail=1; \
|
2003-04-02 06:16:10 +08:00
|
|
|
grep '\$$@"' $(srcdir)/*.texi && fail=1; \
|
2004-07-02 23:13:42 +08:00
|
|
|
grep -n '[^[:punct:]]@footnote' $(srcdir)/*.texi && fail=1; \
|
2006-05-27 21:43:07 +08:00
|
|
|
grep -n filename $(srcdir)/*.texi|$(EGREP) -v 'setfilename|[{]filename[}]' \
|
2004-07-02 23:05:40 +08:00
|
|
|
&& fail=1; \
|
2003-04-02 22:45:21 +08:00
|
|
|
$(PERL) -e 1 2> /dev/null && { $(PERL) -ne \
|
2003-02-06 04:39:59 +08:00
|
|
|
'/\bPOSIX\b/ && !/\@acronym{POSIX}/ && !/^\* / || /{posix}/ and print,exit 1' \
|
2003-04-02 06:16:10 +08:00
|
|
|
$(srcdir)/*.texi 2> /dev/null || fail=1; }; \
|
2006-07-08 13:31:59 +08:00
|
|
|
$(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/*.texi && fail=1; \
|
2006-06-13 04:10:25 +08:00
|
|
|
$(EGREP) -i '$(_W)builtins?$(W_)' $(srcdir)/*.texi && fail=1; \
|
|
|
|
$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(srcdir)/*.texi \
|
2006-05-27 21:43:07 +08:00
|
|
|
| $(EGREP) -v '@vindex PATH$$|@env[{]PATH[}]' && fail=1; \
|
2003-04-02 06:16:10 +08:00
|
|
|
exit $$fail
|
2001-05-20 16:21:05 +08:00
|
|
|
|
|
|
|
check: check-texinfo
|