docs: deprecate .log -> .html conversion by parallel-tests
[automake.git] / tests / deleted-m4.test
blob6b0b9af4bf11e737ae64a83c10c1a6ac0806affa
1 #! /bin/sh
2 # Copyright (C) 2011 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 # The stub rules emitted to work around the "deleted header problem"
18 # for `.m4' files shouldn't prevent the remake rules from correctly
19 # erroring out when a still-required file is missing.
20 # See also discussion about automake bug#9768.
22 . ./defs || Exit 1
24 set -e
26 cat >> configure.in <<'END'
27 m4_include([foobar.m4])
28 AC_OUTPUT
29 END
31 : > Makefile.am
33 echo 'm4_include([zardoz.m4])' > foobar.m4
34 : > zardoz.m4
36 $ACLOCAL
37 $AUTOCONF
38 $AUTOMAKE
40 ./configure
41 $MAKE
43 rm -f zardoz.m4
44 $MAKE >output 2>&1 && { cat output; Exit 1; }
45 cat output
46 # This error will come from aclocal, not make, so we can be stricter
47 # in our grepping of it.
48 grep ' foobar\.m4:1:.*zardoz\.m4.*does not exist' output
49 # No spurious errors, please.
50 $FGREP -v ' foobar.m4:1:' output | $FGREP 'foobar.m4' && Exit 1
52 # Try with one less indirection.
53 : > foobar.m4
54 $ACLOCAL --force
55 $AUTOCONF
56 ./configure
57 $MAKE # Sanity check.
58 rm -f foobar.m4
59 $MAKE >output 2>&1 && { cat output; Exit 1; }
60 cat output
61 # This error will come from aclocal, not make, so we can be stricter
62 # in our grepping of it.
63 grep 'foobar\.m4.*does not exist' output
64 # No spurious errors, please (ok, this is really paranoid).
65 $FGREP 'zardoz.m4' output && Exit 1