news: update w.r.t. recent depcomp changes
[automake.git] / t / silent-texi.sh
blob358d06818fb34e17f1094281da2f145489f8fdc8
1 #!/bin/sh
2 # Copyright (C) 2009-2012 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 <http://www.gnu.org/licenses/>.
17 # Check texinfo rules in silent-rules mode.
19 required='makeinfo tex texi2dvi dvips'
20 . test-init.sh
22 echo AC_OUTPUT >> configure.ac
24 cat > Makefile.am <<'EOF'
25 info_TEXINFOS = foo.texi sub/zardoz.texi
26 EOF
28 cat > foo.texi <<'EOF'
29 \input texinfo
30 @setfilename foo.info
31 @settitle foo manual
32 @bye
33 EOF
35 mkdir sub
36 cat > sub/zardoz.texi <<'EOF'
37 \input texinfo
38 @setfilename zardoz.info
39 @settitle zardoz manual
40 @bye
41 EOF
43 $ACLOCAL
44 $AUTOMAKE --add-missing
45 $AUTOCONF
47 ./configure --disable-silent-rules
49 # Silent mode output.
50 st=0
51 $MAKE V=0 dvi html info ps pdf >stdout 2>stderr || st=$?
52 cat stdout
53 cat stderr >&2
54 test $st -eq 0
55 grep '^ DVIPS foo\.ps$' stdout
56 grep '^ MAKEINFO foo\.html$' stdout
57 # NetBSD make will print './foo.info' instead of 'foo.info'.
58 $EGREP '^ MAKEINFO (|\./)foo\.info$' stdout
59 grep '^ TEXI2DVI foo\.dvi$' stdout
60 grep '^ TEXI2PDF foo\.pdf$' stdout
61 grep '^ DVIPS sub/zardoz.ps$' stdout
62 grep '^ MAKEINFO sub/zardoz.html$' stdout
63 # NetBSD make will print './sub/zardoz.info' instead of 'zardoz.info'.
64 $EGREP '^ MAKEINFO (|\./)sub/zardoz.info$' stdout
65 grep '^ TEXI2DVI sub/zardoz.dvi$' stdout
66 grep '^ TEXI2PDF sub/zardoz.pdf$' stdout
67 # No make recipe is displayed before being executed.
68 $EGREP 'texi2(dvi|pdf)|dvips|makeinfo|(rm|mv) ' \
69 stdout stderr && exit 1
70 # No verbose output from TeX nor dvips.
71 $EGREP '(zardoz|foo)\.log|3\.14|Copyright|This is|[Oo]utput ' \
72 stdout stderr && exit 1
74 # Verbose mode output.
75 $MAKE clean || exit 1
76 $MAKE V=1 dvi html info ps pdf >output 2>&1 || { cat output; exit 1; }
77 cat output
78 $EGREP '(DVIPS|MAKEINFO|TEXI2(PDF|DVI)) ' output && exit 1
79 # Verbose output from TeX.
80 grep '[Oo]utput .*foo\.pdf' output
81 grep '[Oo]utput .*zardoz\.pdf' output
82 $FGREP 'foo.log' output
83 $FGREP 'zardoz.log' output
84 # Verbose output from dvips.
85 $FGREP ' dvips' output