Clarify overriding of `*_DEPENDENCIES' in LIBOBJS node.
[automake/ericb.git] / tests / remake7.test
blob2752c26e5ca653bd7a327980aa7a0fbc0b3558a2
1 #! /bin/sh
2 # Copyright (C) 2008 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 3, 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 remaking rules fail when they should.
19 . ./defs || Exit 1
20 set -e
22 cat > configure.in << 'END'
23 AC_INIT
24 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
25 AC_OUTPUT(Makefile sub/Makefile)
26 END
28 cat > Makefile.am <<'END'
29 SUBDIRS = sub
30 END
31 mkdir sub
32 : > sub/Makefile.am
34 $ACLOCAL
35 $AUTOMAKE
36 $AUTOCONF
37 ./configure
38 $MAKE
40 $sleep
42 # Fail for broken input files.
44 echo "if FOO" > sub/Makefile.am
45 $MAKE && Exit 1
47 : >sub/Makefile.am
48 $MAKE
50 mv Makefile.am backup
51 echo "if FOO" > Makefile.am
52 $MAKE && Exit 1
54 # Fail for missing input files, with or without missing
55 # Makefile.in files.
57 cp backup Makefile.am
58 mv sub/Makefile.am sub/backup
59 $MAKE && Exit 1
61 rm -f sub/Makefile.in
62 $MAKE && Exit 1
64 mv sub/backup sub/Makefile.am
65 rm -f Makefile.am
66 $MAKE && Exit 1
68 rm -f Makefile.in
69 $MAKE && Exit 1