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)
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'
22 echo AC_OUTPUT
>> configure.ac
24 cat > Makefile.am
<<'EOF'
25 info_TEXINFOS = foo.texi sub/zardoz.texi
28 cat > foo.texi
<<'EOF'
36 cat > sub
/zardoz.texi
<<'EOF'
38 @setfilename zardoz.info
39 @settitle zardoz manual
44 $AUTOMAKE --add-missing
47 .
/configure
--disable-silent-rules
51 $MAKE V
=0 dvi html info ps pdf
>stdout
2>stderr || st
=$?
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.
76 $MAKE V
=1 dvi html info ps pdf
>output
2>&1 ||
{ cat output
; exit 1; }
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