diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-09-04 14:50:49 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-09-04 15:14:22 +0200 |
commit | cf41f5af46f715077219cd2ec86471021e782937 (patch) | |
tree | 0a7edb142936da3ed3b62b8542924ff2cf446132 /t/warnings-obsolete-default.sh | |
parent | d343f7af1481ecb017dbf2aefd7b7c66622d2d33 (diff) | |
download | automake-cf41f5af46f715077219cd2ec86471021e782937.tar.gz |
warns: enable category 'obsolete' by default
No surprise that our users were bitten by backward-incompatible changes
especially hard: the warnings in the 'obsolete' category, that might
have informed them of the upcoming incompatibilities, and help them to
prepare for the transition, where not enabled by default!
* NEWS, doc/automake.texi: Update.
* lib/Automake/ChannelDefs.pm: Enable warnings in the category 'obsolete'
by default.
* t/warnings-obsolete-default.sh: New test.
* t/list-of-tests.mk: Add it.
* t/backcompat.sh: Use 'configure.ac' rather than 'configure.in' as
autoconf input file, to avoid spurious aclocal errors.
* t/backcompat2.sh: Likewise.
* t/backcompat3.sh: Likewise.
* t/backcompat5.sh: Add '-Wno-obsolete' when invoking aclocal. Adjust
heading comments.
* t/backcompat6.sh: Likewise.
* t/cygnus-imply-foreign.sh: Add '-Wno-obsolete' when invoking automake.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/warnings-obsolete-default.sh')
-rwxr-xr-x | t/warnings-obsolete-default.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/t/warnings-obsolete-default.sh b/t/warnings-obsolete-default.sh new file mode 100755 index 000000000..fc439eab9 --- /dev/null +++ b/t/warnings-obsolete-default.sh @@ -0,0 +1,39 @@ +#! /bin/sh +# Copyright (C) 2011-2012 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# Check that automake warnings in the 'obsolete' category are enabled +# by default. + +. ./defs || exit 1 + +# We want (almost) complete control over automake options. +AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror" + +echo AC_PROG_CC >> configure.ac + +cat > Makefile.am <<'END' +bin_PROGRAMS = foo +INCLUDES = -Ibar +END + +$ACLOCAL +AUTOMAKE_fails +grep '^Makefile\.am:2:.*INCLUDES.*AM_CPPFLAGS' stderr + +# Check that we can override warnings about obsolete stuff. +$AUTOMAKE -Wno-obsolete + +: |