2 # Copyright (C) 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 # Automake must complain if AC_CONFIG_FILES is passed something starting
18 # with a dot (like "./Makefile"), since the remake rules might be subtly
19 # broken in that case.
26 cat > configure.in << END
29 AC_CONFIG_FILES([./Makefile])
30 AC_CONFIG_FILES([./foo:a.in:b.in:c.in])
34 echo foo = barbarbar > Makefile.am
40 AUTOMAKE_fails -Wnone -Wunsupported
41 grep "^configure\.in:3:.*'\\./Makefile'" stderr
42 grep "^configure\.in:3:.* omit leading '\\./'" stderr
43 grep "^configure\.in:3:.*remake rules might be subtly broken" stderr
44 grep "^configure\.in:4:.*'\\./foo'" stderr
45 grep "^configure\.in:4:.* omit leading '\\./'" stderr
46 grep "^configure\.in:4:.*remake rules might be subtly broken" stderr
48 # Check that our warning was actually justified.
50 $AUTOMAKE -Wall -Wno-unsupported
53 grep barbarbar Makefile
54 # No need to sleep here, configure did that for us already.
55 echo foo = bazbazbaz > Makefile.am
56 # Check that remake rules do truly break -- otherwise automake is
57 # giving a bogus warning.
58 $MAKE 2>stderr && { cat stderr >&2 Exit 1; }
60 grep "config\\.status:.*invalid argument.*[\`\"']Makefile[\`\"']" stderr