2 # Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
4 # This file is part of GNU Automake.
6 # GNU Automake is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
11 # GNU Automake is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with autoconf; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 # Boston, MA 02111-1307, USA.
21 # Test for another `+=' problem. Report from Brian Jones.
25 echo 'AM_CONDITIONAL(CHECK, true)' >> configure.
in
27 cat > Makefile.am
<< 'END'
35 $AUTOMAKE 2>stderr
&& exit 1
37 cat stderr
# for debugging
39 # We expect the following diagnostic:
41 # Makefile.am:4: Cannot apply `+=' because `INCLUDES' is not defined in
42 # Makefile.am:4: the following conditions:
43 # Makefile.am:4: CHECK_FALSE
44 # Makefile.am:4: Either define `INCLUDES' in these conditions, or use
45 # Makefile.am:4: `+=' in the same conditions as the definitions.
47 # Is CHECK_FALSE mentioned?
48 grep ':.*CHECK_FALSE$' stderr ||
exit 1
49 # Is there only one missing condition?
50 test `grep ': ' stderr | wc -l` = 1 ||
exit 1
52 # By the way, Automake should suggest using AM_CPPFLAGS,
53 # because INCLUDES is an obsolete name.
54 grep AM_CPPFLAGS stderr ||
exit 1
56 # A way to suppress the obsolete warning is to use
58 echo 'AUTOMAKE_OPTIONS = -Wno-obsolete' >> Makefile.am
59 $AUTOMAKE 2>stderr
&& exit 1
61 grep AM_CPPFLAGS stderr
&& exit 1
62 # CHECK_FALSE should still be mentioned.
63 grep ':.*CHECK_FALSE$' stderr ||
exit 1