Tag
Hash :
91c2a87f
Author :
Date :
2002-07-16T21:46:59
* lib/Automake/Channels.pm (dup_channel_setup, drop_channel_setup): New functions. (@EXPORT): Add them. * automake.in (generate_makefile): Call dup_channel_setup and drop_channel_setup. (process_option_list): Recognize --warnings and -W options. * automake.texi (Options): Document them. * tests/pluseq5.test: Check that -Wno-obsolete will disable the warning. * tests/warnopts.test: New file. * tests/Makefile.am (TESTS): Add warnopts.test.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
#! /bin/sh
# Test for another `+=' problem. Report from Brian Jones.
. $srcdir/defs || exit 1
echo 'AM_CONDITIONAL(CHECK, true)' >> configure.in
cat > Makefile.am << 'END'
if CHECK
INCLUDES = abc
endif
INCLUDES += def
END
$ACLOCAL || exit 1
$AUTOMAKE 2>stderr && exit 1
cat stderr # for debugging
# We expect the following diagnostic:
#
# Makefile.am:4: Cannot apply `+=' because `INCLUDES' is not defined in
# Makefile.am:4: the following conditions:
# Makefile.am:4: CHECK_FALSE
# Makefile.am:4: Either define `INCLUDES' in these conditions, or use
# Makefile.am:4: `+=' in the same conditions as the definitions.
# Is CHECK_FALSE mentioned?
grep ':.*CHECK_FALSE$' stderr || exit 1
# Is there only one missing condition?
test `grep ': ' stderr | wc -l` = 1 || exit 1
# By the way, Automake should suggest using AM_CPPFLAGS,
# because INCLUDES is an obsolete name.
grep AM_CPPFLAGS stderr || exit 1
# A way to suppress the obsolete warning is to use
# -Wno-obsolete:
echo 'AUTOMAKE_OPTIONS = -Wno-obsolete' >> Makefile.am
$AUTOMAKE 2>stderr && exit 1
cat stderr
grep AM_CPPFLAGS stderr && exit 1
# CHECK_FALSE should still be mentioned.
grep ':.*CHECK_FALSE$' stderr || exit 1