From: Akim Demaille Date: Mon, 26 Nov 2001 15:30:34 +0000 (+0000) Subject: * automake.in (¯o_define): Use $where when reporting an error, X-Git-Tag: Release-1-5b~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e987bff3905044c484ea1b396ace52652b5ea90;p=thirdparty%2Fautomake.git * automake.in (¯o_define): Use $where when reporting an error, not the place where the macro was first defined since (i) if this is the first definition, then obviously it was not defined before, and (ii) anyway, the error is with the new definition, not the first. --- diff --git a/ChangeLog b/ChangeLog index 5a7aa3bc3..b5ce1cf84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-11-26 Akim Demaille + + * automake.in (¯o_define): Use $where when reporting an error, + not the place where the macro was first defined since (i) if this + is the first definition, then obviously it was not defined before, + and (ii) anyway, the error is with the new definition, not the + first. + 2001-11-26 Alexandre Duret-Lutz * lib/am/distdir.am (distcheck): Call distcleancheck. diff --git a/automake.in b/automake.in index 7809f0d20..47836840a 100755 --- a/automake.in +++ b/automake.in @@ -5716,16 +5716,16 @@ sub macro_define ($$$$$$) { if (defined $var_type{$var} && $var_type{$var} ne $type) { - macro_error ($var, - ("$var was set with `$var_type{$var}=' " - . "and is now set with `$type='")); + file_error ($where, + ("$var was set with `$var_type{$var}=' " + . "and is now set with `$type='")); } } else { if (!defined $var_type{$var} && $type eq '+') { - macro_error ($var, "$var must be set with `=' before using `+='"); + file_error ($where, "$var must be set with `=' before using `+='"); } } $var_type{$var} = $type;