2 # Copyright (C) 2012-2013 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.
24 cat > configure.ac << END
27 AC_CONFIG_FILES([./Makefile])
28 AC_CONFIG_FILES([./foo:a.in:b.in:c.in])
32 touch a.in b.in c.in Makefile.am
36 AUTOMAKE_fails -Wnone -Wunsupported
37 grep "^configure\.ac:3:.*'\\./Makefile'" stderr
38 grep "^configure\.ac:3:.* omit leading '\\./'" stderr
39 grep "^configure\.ac:3:.*remake rules might be subtly broken" stderr
40 grep "^configure\.ac:4:.*'\\./foo'" stderr
41 grep "^configure\.ac:4:.* omit leading '\\./'" stderr
42 grep "^configure\.ac:4:.*remake rules might be subtly broken" stderr
44 # Check that our warning was actually justified.
45 sed 's/^AM_INIT_AUTOMAKE/&([-Wall -Wno-unsupported])/' <configure.ac >t
47 rm -rf autom4te*.cache
50 $AUTOMAKE -Wall -Wno-unsupported
55 # Check that remake rules do truly break -- otherwise automake is
56 # giving a bogus warning.
58 grep "config\\.status:.*invalid argument.*Makefile" stderr