tests: make 'lzip.test' executable
[automake.git] / tests / deleted-am.test
blobfa41e9e1060e707f5054777b455c0ef1e39e2cc5
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 `.am' 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 echo AC_OUTPUT >> configure.in
28 echo 'include $(top_srcdir)/foobar.am' > Makefile.am
29 echo 'include zardoz.am' > foobar.am
30 : > zardoz.am
32 $ACLOCAL
33 $AUTOCONF
34 $AUTOMAKE
36 ./configure
37 $MAKE
39 rm -f zardoz.am
40 $MAKE >output 2>&1 && { cat output; Exit 1; }
41 cat output
42 # This error will come from automake, not make, so we can be stricter
43 # in our grepping of it.
44 grep 'cannot open.*zardoz\.am' output
45 grep 'foobar\.am' output && Exit 1 # No spurious error, please.
47 # Try with one less indirection.
48 : > foobar.am
49 $AUTOMAKE Makefile
50 ./config.status Makefile
51 $MAKE # Sanity check.
52 rm -f foobar.am
53 $MAKE >output 2>&1 && { cat output; Exit 1; }
54 cat output
55 # This error will come from automake, not make, so we can be stricter
56 # in our grepping of it.
57 grep 'cannot open.*foobar\.am' output