tests: avoid two spurious failures on FreeBSD
[automake.git] / t / txinfo30.sh
blob8c6aa912dc68913b674048b5ff81dd353a640ebb
1 #! /bin/sh
2 # Copyright (C) 2005-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 # Make sure 'missing texinfo' does not create empty files.
18 # Report from Bob Proulx.
20 . ./defs || exit 1
22 echo info_TEXINFOS = bar.texi >Makefile.am
23 echo grepme >bar.info
24 $sleep
25 cat >bar.texi <<EOF
26 @setfilename bar.info
27 EOF
29 echo AC_OUTPUT >>configure.ac
31 cat >makeinfo <<\EOF
32 #!/bin/sh
33 # This script
34 # 1. fails so 'missing' can take over
35 # 2. does not understand '--version' so 'missing' thinks 'makeinfo' isn't
36 # installed
37 exec false
38 EOF
40 chmod +x makeinfo
42 PATH=$(pwd)$PATH_SEPARATOR$PATH
43 export PATH
45 # Otherwise configure might pick up a working makeinfo from the
46 # environment. Seen in automake bug#10866.
47 unset MAKEINFO || :
49 $ACLOCAL
50 $AUTOCONF
51 $AUTOMAKE --add-missing
53 ./configure
54 $MAKE
55 grep grepme bar.info
56 test -f bar.info
58 # We should not create a missing bar.info.
59 rm -f bar.info
60 $MAKE && exit 1
61 test ! -e bar.info