From: Akim Demaille Date: Thu, 12 Apr 2001 15:44:56 +0000 (+0000) Subject: * automake.in (¯o_define): Ignore Automake definition for X-Git-Tag: handle-languages~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19b2d1cd52e2a6be003f2879599afdbdee6d67fa;p=thirdparty%2Fautomake.git * automake.in (¯o_define): Ignore Automake definition for ($var, $cond) if there is already a user definition for ($var, $cond). --- diff --git a/ChangeLog b/ChangeLog index 515a3c355..486c1f40e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-04-12 Akim Demaille + + * automake.in (¯o_define): Ignore Automake definition for + ($var, $cond) if there is already a user definition for ($var, $cond). + 2001-04-12 Akim Demaille * automake.in (&scan_texinfo_file): Catch @cindex and the like, diff --git a/automake.in b/automake.in index da0850056..7f305dc04 100755 --- a/automake.in +++ b/automake.in @@ -5636,13 +5636,27 @@ sub macro_define ($$$$$$) $var_line{$var} = $where unless defined $var_line{$var}; - # There must be no previous value unless the user is redefining - # an Automake variable or an AC_SUBST variable. - check_ambiguous_conditional ($var, $cond) - unless ($var_is_am{$var} && !$var_is_am - || exists $configure_vars{$var}); + # If Automake tries to override a value specified by the user, + # just don't let it do. + if (defined $var_value{$var}{$cond} && !$var_is_am{$var} && $var_is_am) + { + if ($verbose) + { + print STDERR "$me: refusing to override the user definition of:\n"; + variable_dump ($var); + print STDERR "$me: with `$cond' => `$value'\n"; + } + } + else + { + # There must be no previous value unless the user is redefining + # an Automake variable or an AC_SUBST variable. + check_ambiguous_conditional ($var, $cond) + unless ($var_is_am{$var} && !$var_is_am + || exists $configure_vars{$var}); - $var_value{$var}{$cond} = $value; + $var_value{$var}{$cond} = $value; + } } # An Automake variable can be given to the user, but not the converse.