Merge branch 'msvc'
[platform/upstream/automake.git] / tests / silent8.test
1 #!/bin/sh
2 # Copyright (C) 2009, 2010 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
21
22 set -e
23
24 cat >>configure.in <<'EOF'
25 AM_SILENT_RULES
26 AC_OUTPUT
27 EOF
28
29 cat > Makefile.am <<'EOF'
30 info_TEXINFOS = foo.texi
31 EOF
32
33 cat > foo.texi <<'EOF'
34 \input texinfo
35 @c %**start of header
36 @setfilename foo.info
37 @settitle foo manual
38 @c %**end of header
39 @bye
40 EOF
41
42 $ACLOCAL
43 $AUTOMAKE --add-missing
44 $AUTOCONF
45
46 ./configure --disable-silent-rules
47
48 # Make sure that all labels work in silent-mode
49 $MAKE V=0 dvi html info ps pdf >stdout || { cat stdout; Exit 1; }
50 cat stdout
51 grep 'DVIPS    foo.ps' stdout || Exit 1
52 grep 'MAKEINFO foo.html' stdout || Exit 1
53 # NetBSD make will print `./foo.info' instead of `foo.info'.
54 grep 'MAKEINFO.*foo.info' stdout || Exit 1
55 grep 'TEXI2DVI foo.dvi' stdout || Exit 1
56 grep 'TEXI2PDF foo.pdf' stdout || Exit 1
57
58 # Now make sure the labels don't appear in verbose mode.
59 $MAKE clean || Exit 1
60 $MAKE V=1 dvi html info ps pdf >stdout || { cat stdout; Exit 1; }
61 cat stdout
62 grep 'DVIPS    foo.ps' stdout && Exit 1
63 grep 'MAKEINFO foo.html' stdout && Exit 1
64 grep 'MAKEINFO.*foo.info' stdout && Exit 1
65 grep 'TEXI2DVI foo.dvi' stdout && Exit 1
66 grep 'TEXI2PDF foo.pdf' stdout && Exit 1
67
68 :