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 2 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, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 info_TEXINFOS = coreutils.texi
23 EXTRA_DIST = perm.texi getdate.texi constants.texi fdl.texi
25 # The following is necessary if the package name is 8 characters or longer.
26 # If the info documentation would be split into 10 or more separate files,
27 # then this is necessary even if the package name is 7 characters long.
29 # Tell makeinfo to put everything in a single info file: <package>.info.
30 # Otherwise, it would also generate files with names like <package>.info-[123],
31 # and those names all map to one 14-byte name (<package>.info-) on some crufty
33 AM_MAKEINFOFLAGS = --no-split
35 constants.texi: $(top_srcdir)/src/tail.c
37 sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
38 $(top_srcdir)/src/tail.c > t-$@
41 MAINTAINERCLEANFILES = constants.texi
43 $(DVIS): $(EXTRA_DIST)
44 $(INFO_DEPS): $(EXTRA_DIST)
46 # Extended regular expressions to match word starts and ends.
47 _W = (^|[^A-Za-z0-9_])
48 W_ = ([^A-Za-z0-9_]|$$)
50 # List words/regexps here that should not appear in the texinfo documentation.
51 # E.g., use @sc{nul}, not `NUL'
52 # Use `time zone', not `timezone'.
53 # Use `zeros', not `zeroes' (nothing wrong with `zeroes'. just be consistent).
56 grep timezone $(srcdir)/*.texi && fail=1; \
57 $(EGREP) '$(_W)IO$(W_)' $(srcdir)/*.texi && fail=1; \
58 grep non-zero $(srcdir)/*.texi && fail=1; \
59 grep '@url{' $(srcdir)/*.texi && fail=1; \
60 $(EGREP) '$(_W)NUL$(W_)' $(srcdir)/*.texi && fail=1; \
61 grep '\$$@"' $(srcdir)/*.texi && fail=1; \
62 grep -n '[^[:punct:]]@footnote' $(srcdir)/*.texi && fail=1; \
63 grep -n filename $(srcdir)/*.texi|$(EGREP) -v 'setfilename|[{]filename[}]' \
65 $(PERL) -e 1 2> /dev/null && { $(PERL) -ne \
66 '/\bPOSIX\b/ && !/\@acronym{POSIX}/ && !/^\* / || /{posix}/ and print,exit 1' \
67 $(srcdir)/*.texi 2> /dev/null || fail=1; }; \
68 $(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/*.texi && fail=1; \
69 $(EGREP) -i '$(_W)builtins?$(W_)' $(srcdir)/*.texi && fail=1; \
70 $(EGREP) -i '$(_W)path(name)?s?$(W_)' $(srcdir)/*.texi \
71 | $(EGREP) -v '@vindex PATH$$|@env[{]PATH[}]' && fail=1; \