* src/seq.c (print_numbers): Rewrite in an attempt to avoid the
[coreutils/bo.git] / doc / Makefile.am
blobcbfacc22931561d4184626a6d6a2ad88ba000479
1 # Make coreutils documentation.                         -*-Makefile-*-
3 # Copyright (C) 1995, 1996, 1997, 1998, 2001, 2002, 2003, 2004, 2005,
4 # 2006 Free Software Foundation, Inc.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 info_TEXINFOS = coreutils.texi
21 EXTRA_DIST = perm.texi getdate.texi constants.texi fdl.texi
23 # The following is necessary if the package name is 8 characters or longer.
24 # If the info documentation would be split into 10 or more separate files,
25 # then this is necessary even if the package name is 7 characters long.
27 # Tell makeinfo to put everything in a single info file: <package>.info.
28 # Otherwise, it would also generate files with names like <package>.info-[123],
29 # and those names all map to one 14-byte name (<package>.info-) on some crufty
30 # old systems.
31 AM_MAKEINFOFLAGS = --no-split
33 constants.texi: $(top_srcdir)/src/tail.c
34         LC_ALL=C \
35         sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
36           $(top_srcdir)/src/tail.c > t-$@
37         mv t-$@ $@
39 MAINTAINERCLEANFILES = constants.texi
41 $(DVIS): $(EXTRA_DIST)
42 $(INFO_DEPS): $(EXTRA_DIST)
44 # Extended regular expressions to match word starts and ends.
45 _W = (^|[^A-Za-z0-9_])
46 W_ = ([^A-Za-z0-9_]|$$)
48 # List words/regexps here that should not appear in the texinfo documentation.
49 # E.g., use @sc{nul}, not `NUL'
50 # Use `time zone', not `timezone'.
51 # Use `zeros', not `zeroes' (nothing wrong with `zeroes'. just be consistent).
52 check-texinfo:
53         fail=0; \
54         grep timezone $(srcdir)/*.texi && fail=1; \
55         $(EGREP) '$(_W)IO$(W_)' $(srcdir)/*.texi && fail=1; \
56         grep non-zero $(srcdir)/*.texi && fail=1; \
57         grep '@url{' $(srcdir)/*.texi && fail=1; \
58         $(EGREP) '$(_W)NUL$(W_)' $(srcdir)/*.texi && fail=1; \
59         grep '\$$@"' $(srcdir)/*.texi && fail=1; \
60         grep -n '[^[:punct:]]@footnote' $(srcdir)/*.texi && fail=1; \
61         grep -n filename $(srcdir)/*.texi|$(EGREP) -v 'setfilename|[{]filename[}]' \
62           && fail=1; \
63         $(PERL) -e 1 2> /dev/null && { $(PERL) -ne \
64           '/\bPOSIX\b/ && !/\@acronym{POSIX}/ && !/^\* / || /{posix}/ and print,exit 1' \
65           $(srcdir)/*.texi 2> /dev/null || fail=1; }; \
66         $(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/*.texi && fail=1; \
67         $(EGREP) -i '$(_W)builtins?$(W_)' $(srcdir)/*.texi && fail=1; \
68         $(EGREP) -i '$(_W)path(name)?s?$(W_)' $(srcdir)/*.texi \
69           | $(EGREP) -v '@vindex PATH$$|@env[{]PATH[}]' && fail=1; \
70         exit $$fail
72 check: check-texinfo