From: Alexandre Duret-Lutz Date: Fri, 10 Sep 2004 19:29:51 +0000 (+0000) Subject: * lib/Automake/Channels.pm (_print_message): Handle uniq_part with X-Git-Tag: Release-1-9b~306 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=4d6b5e15598465d92752ae367251bd97cc4bde59;p=automake.git * lib/Automake/Channels.pm (_print_message): Handle uniq_part with arbitrary string. * automake.in (lang_c_rewrite): Set uniq_part so that the AM_PROG_CC_C_O diagnostic is output only once for subdir objects and only once for objects with per-target flags. --- diff --git a/ChangeLog b/ChangeLog index ebfdd178..23f23e8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2004-09-10 Alexandre Duret-Lutz + * lib/Automake/Channels.pm (_print_message): Handle uniq_part with + arbitrary string. + * automake.in (lang_c_rewrite): Set uniq_part so that the + AM_PROG_CC_C_O diagnostic is output only once for subdir objects + and only once for objects with per-target flags. + * automake.in (lang_c_rewrite): Print files and locations for AM_PROG_CC_C_O errors. (handle_single_transform): Pass $var to &$subr so it can diff --git a/automake.in b/automake.in index 6dd8d003..b240ce85 100755 --- a/automake.in +++ b/automake.in @@ -5100,7 +5100,8 @@ sub lang_c_rewrite # so we do not have to require AM_PROG_CC_C_O when building .lo files. err_var ($var, "compiling `$base.c' in subdir requires " . "`AM_PROG_CC_C_O' in `$configure_ac'", - uniq_scope => US_GLOBAL, uniq_part => UP_TEXT) + uniq_scope => US_GLOBAL, + uniq_part => 'AM_PROG_CC_C_O subdir') unless $seen_cc_c_o || $nonansi_obj eq '.lo'; } @@ -5122,7 +5123,8 @@ sub lang_c_rewrite { err_var ($var, "compiling `$base.c' with per-target flags requires " . "`AM_PROG_CC_C_O' in `$configure_ac'", - uniq_scope => US_GLOBAL, uniq_part => UP_TEXT) + uniq_scope => US_GLOBAL, + uniq_part => 'AM_PROG_CC_C_O per-target') } return $r; diff --git a/lib/Automake/Channels.pm b/lib/Automake/Channels.pm index ddd7f1ec..0141fd34 100644 --- a/lib/Automake/Channels.pm +++ b/lib/Automake/Channels.pm @@ -1,4 +1,4 @@ -# Copyright (C) 2002 Free Software Foundation, Inc. +# Copyright (C) 2002, 2004 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 @@ -176,6 +176,9 @@ The part of the message subject to duplicate filtering. See the documentation for the C, C, and C constants above. +C can also be set to an arbitrary string that will be used +instead of the message when considering duplicates. + =item C US_LOCAL> The scope of duplicate filtering. See the documentation for the @@ -425,21 +428,21 @@ sub _print_message ($$%) } # Check for duplicate message if requested. - if ($opts{'uniq_part'} != UP_NONE) + if ($opts{'uniq_part'} ne UP_NONE) { # Which part of the error should we match? my $to_filter; - if ($opts{'uniq_part'} == UP_TEXT) + if ($opts{'uniq_part'} eq UP_TEXT) { $to_filter = $message; } - elsif ($opts{'uniq_part'} == UP_LOC_TEXT) + elsif ($opts{'uniq_part'} eq UP_LOC_TEXT) { $to_filter = $msg; } else { - confess "unknown value for uniq_part: " . $opts{'uniq_part'}; + $to_filter = $opts{'uniq_part'}; } # Do we want local or global uniqueness?