Merge branch 'simplify-exit-trap-workaround' into maint
[platform/upstream/automake.git] / t / silent8.sh
1 #!/bin/sh
2 # Copyright (C) 2009-2012 Free Software Foundation, Inc.
3 #
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.
8 #
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.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17 # Check texinfo rules in silent-rules mode.
18
19 required='makeinfo-html tex texi2dvi-o dvips'
20 . ./defs || exit 1
21
22 cat >>configure.ac <<'EOF'
23 AM_SILENT_RULES
24 AC_OUTPUT
25 EOF
26
27 cat > Makefile.am <<'EOF'
28 info_TEXINFOS = foo.texi
29 EOF
30
31 cat > foo.texi <<'EOF'
32 \input texinfo
33 @c %**start of header
34 @setfilename foo.info
35 @settitle foo manual
36 @c %**end of header
37 @bye
38 EOF
39
40 $ACLOCAL
41 $AUTOMAKE --add-missing
42 $AUTOCONF
43
44 ./configure --disable-silent-rules
45
46 # Make sure that all labels work in silent-mode.
47 $MAKE V=0 dvi html info ps pdf >stdout || { cat stdout; exit 1; }
48 cat stdout
49 grep 'DVIPS    foo.ps' stdout || exit 1
50 grep 'MAKEINFO foo.html' stdout || exit 1
51 # NetBSD make will print './foo.info' instead of 'foo.info'.
52 grep 'MAKEINFO.*foo.info' stdout || exit 1
53 grep 'TEXI2DVI foo.dvi' stdout || exit 1
54 grep 'TEXI2PDF foo.pdf' stdout || exit 1
55
56 # Now make sure the labels don't appear in verbose mode.
57 $MAKE clean || exit 1
58 $MAKE V=1 dvi html info ps pdf >stdout || { cat stdout; exit 1; }
59 cat stdout
60 grep 'DVIPS    foo.ps' stdout && exit 1
61 grep 'MAKEINFO foo.html' stdout && exit 1
62 grep 'MAKEINFO.*foo.info' stdout && exit 1
63 grep 'TEXI2DVI foo.dvi' stdout && exit 1
64 grep 'TEXI2PDF foo.pdf' stdout && exit 1
65
66 :