maint: Update HACKING
[automake.git] / t / txinfo-no-split.sh
blobba7ec0d29f793a15e434f95b8f8b507c53350df0
1 #! /bin/sh
2 # Copyright (C) 2013-2017 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
7 # any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <https://www.gnu.org/licenses/>.
17 # Info split files should not be produced (automake bug#13351).
19 required=makeinfo
20 . test-init.sh
22 echo AC_OUTPUT >> configure.ac
24 cat > Makefile.am <<'END'
25 MAKEINFO = makeinfo --split-size 10
26 info_TEXINFOS = foo.texi
28 test-split: # A sanity check.
29 $(MAKEINFO) -o split.info foo.texi
31 check-local:
32 test -f $(srcdir)/foo.info
33 test ! -f $(srcdir)/foo.info-1
34 test "`find $(srcdir) . | grep '\.info'`" = "$(srcdir)/foo.info"
35 END
37 # Systems lacking a working TeX installation cannot run "make dvi".
38 if test -z "$TEX"; then
39 warn_ "TeX installation missing, \"make dvi\" will be skipped"
40 echo AUTOMAKE_OPTIONS = -Wno-override >> Makefile.am
41 echo 'dvi:; @echo Tex is missing, do nothing' >> Makefile.am
44 cat > foo.texi << 'END'
45 \input texinfo
46 @setfilename foo.info
47 @settitle foo
48 @dircategory Dummy utilities
49 @direntry
50 * Foo: (foo). Does nothing at all.
51 @end direntry
53 @node Top
54 @top Foo
56 @menu
57 * Intro:: Introduction
58 * Planets:: List of Planets
59 @end menu
61 @node Intro
62 @chapter Introduction
63 Will list planets.
65 @node Planets
66 @chapter List of planets
67 Hello Mercury.
68 Hello Venus
69 Hello Earth
70 Hello Mars.
71 Hello Jupiter.
72 Hello Saturn.
73 Hello Uran.
74 Hello Neptune.
75 Hello Pluto.
76 @bye
77 END
79 $ACLOCAL
80 $AUTOCONF
81 $AUTOMAKE -a
83 ./configure
85 $MAKE test-split
86 ls -l # For debugging.
87 test -f split.info
88 test -f split.info-1
89 test -f split.info-2
90 rm -f split*
92 $MAKE
94 ls -l # For debugging.
95 test -f foo.info
96 test ! -f foo.info-1
97 test "$(find . | $FGREP '.info' | sed 's|^\./||')" = foo.info
99 $MAKE distcheck