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.
2004-09-10 Alexandre Duret-Lutz <adl@gnu.org>
+ * 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
# 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';
}
{
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;
-# 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
documentation for the C<UP_NONE>, C<UP_TEXT>, and C<UP_LOC_TEXT>
constants above.
+C<uniq_part> can also be set to an arbitrary string that will be used
+instead of the message when considering duplicates.
+
=item C<uniq_scope =E<gt> US_LOCAL>
The scope of duplicate filtering. See the documentation for the
}
# 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?