From 20db84326982518f2661d91ac6a9164cefa4ce94 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Thu, 12 Apr 2001 15:44:55 +0000 Subject: [PATCH] * automake.in (¯o_define): Ignore Automake definition for ($var, $cond) if there is already a user definition for ($var, $cond). --- ChangeLog | 5 +++++ automake.in | 26 ++++++++++++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 515a3c35..486c1f40 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 da085005..7f305dc0 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. -- 2.43.5