From 19e0c0ae4b457c0c32f43ac4cbc26dc9965b02a5 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Mon, 9 Mar 2009 21:20:20 +0100 Subject: [PATCH] Let -Wportability turn on/off the portability-recursive channel. * lib/Automake/ChannelDefs.pm (switch_warning): switch `portability-recursive' channel as well if changing the `portability' channel. * tests/dollarvar2.test: New test. * tests/Makefile.am: Update. Signed-off-by: Ralf Wildenhues --- ChangeLog | 9 +++++++++ lib/Automake/ChannelDefs.pm | 2 ++ tests/Makefile.am | 1 + tests/Makefile.in | 1 + tests/dollarvar2.test | 38 +++++++++++++++++++++++++++++++++++++ 5 files changed, 51 insertions(+) create mode 100755 tests/dollarvar2.test diff --git a/ChangeLog b/ChangeLog index 888368fbf..183890a8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-03-09 Ralf Wildenhues + + Let -Wportability turn on/off the portability-recursive channel. + * lib/Automake/ChannelDefs.pm (switch_warning): switch + `portability-recursive' channel as well if changing the + `portability' channel. + * tests/dollarvar2.test: New test. + * tests/Makefile.am: Update. + 2009-03-07 Ralf Wildenhues New automake command line option `--silent-rules'. diff --git a/lib/Automake/ChannelDefs.pm b/lib/Automake/ChannelDefs.pm index 60520b735..436a9049c 100644 --- a/lib/Automake/ChannelDefs.pm +++ b/lib/Automake/ChannelDefs.pm @@ -281,6 +281,8 @@ sub switch_warning ($) elsif (channel_type ($cat) eq 'warning') { setup_channel $cat, silent => $has_no; + setup_channel 'portability-recursive', silent => $has_no + if $cat eq 'portability'; } else { diff --git a/tests/Makefile.am b/tests/Makefile.am index 9b66bff9e..a1af65d6d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -241,6 +241,7 @@ distdir.test \ distname.test \ dollar.test \ dollarvar.test \ +dollarvar2.test \ double.test \ dup2.test \ else.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 42a149f96..04b6582a2 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -396,6 +396,7 @@ distdir.test \ distname.test \ dollar.test \ dollarvar.test \ +dollarvar2.test \ double.test \ dup2.test \ else.test \ diff --git a/tests/dollarvar2.test b/tests/dollarvar2.test new file mode 100755 index 000000000..676cde23c --- /dev/null +++ b/tests/dollarvar2.test @@ -0,0 +1,38 @@ +#!/bin/sh +# Copyright (C) 2009 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 3, 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 . + +# Test to make sure that -Wportability turns on portability-recursive, +# likewise for -Wno-... + +. ./defs + +set -e + +cat >Makefile.am <<'EOF' +x = 1 +bla = $(foo$(x)) +EOF + +$ACLOCAL + +# $AUTOMAKE already contains -Wall -Werror. +AUTOMAKE_fails -Wportability +$AUTOMAKE --force -Wno-all +$AUTOMAKE --force -Wno-portability +echo 'AUTOMAKE_OPTIONS = -Wno-portability' >> Makefile.am +$AUTOMAKE --force + +: -- 2.47.2