summaryrefslogtreecommitdiff
path: root/doc/Makefile.am
blob: c6e8e262db733f4f49f3350faca9909d997f4c5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
## Process this file with automake to produce Makefile.in -*-Makefile-*-
info_TEXINFOS = coreutils.texi

EXTRA_DIST = perm.texi getdate.texi constants.texi doclicense.texi

# 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
# old systems.
MAKEINFO = makeinfo --no-split

constants.texi: $(top_srcdir)/src/tail.c
	LC_ALL=C \
	sed -n -e 's/^#define \(DEFAULT_MAX[_A-Z]*\) \(.*\)/@set \1 \2/p' \
	  $(top_srcdir)/src/tail.c > t-$@
	mv t-$@ $@

MAINTAINERCLEANFILES = constants.texi

$(DVIS): $(EXTRA_DIST)
$(INFO_DEPS): $(EXTRA_DIST)

# 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; \
	grep non-zero $(srcdir)/*.texi && fail=1; \
	grep -w NUL $(srcdir)/*.texi && fail=1; \
	grep '\$$@"' $(srcdir)/*.texi && fail=1; \
	$(PERL) -e 1 2> /dev/null && { $(PERL) -ne \
	  '/\bPOSIX\b/ && !/\@acronym{POSIX}/ && !/^\* / || /{posix}/ and print,exit 1' \
	  $(srcdir)/*.texi 2> /dev/null || fail=1; }; \
	exit $$fail

check: check-texinfo