From dc866a87a704bd43c5e8a4a6828f219be97f1479 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 9 Apr 2001 09:36:48 +0000 Subject: [PATCH] * automake.in (¯o_define): The user is allowed to override a value if it was set by Automake, or if it was found in AC_SUBST. --- ChangeLog | 5 +++++ automake.in | 24 +++++++++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7f6a5a89..2dc510c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-04-09 Akim Demaille + + * automake.in (¯o_define): The user is allowed to override + a value if it was set by Automake, or if it was found in AC_SUBST. + 2001-04-09 Akim Demaille * automake.in (&handle_source_transform): Better locality of the diff --git a/automake.in b/automake.in index 06b6183f..55f6a6b2 100755 --- a/automake.in +++ b/automake.in @@ -5646,12 +5646,6 @@ sub macro_define ($$$$$$) $var_was_plus_eq{$var} = $type eq '+' && ! $var_is_am{$var}; } - # An Automake variable can be given to the user, but not the converse. - if (! defined $var_is_am{$var} || !$var_is_am) - { - $var_is_am{$var} = $var_is_am; - } - # Differentiate the first assignment (including with `+='). if ($type eq '+' && defined $conditional{$var}{$cond}) { @@ -5678,14 +5672,22 @@ sub macro_define ($$$$$$) $content_lines{$var} = $where unless defined $content_lines{$var}; - # There must be no previous value. - check_ambiguous_conditional ($var, $cond); + # 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}); + $conditional{$var}{$cond} = $value; } - # FIXME: I don't understand what's so special wrt `:', nor - # why we forget the `+' nature of a var. - $def_type{$var} = ($type eq ':') ? ':' : ''; + # An Automake variable can be given to the user, but not the converse. + if (! defined $var_is_am{$var} || !$var_is_am) + { + $var_is_am{$var} = $var_is_am; + } + + $def_type{$var} = ($type eq ':') ? ':' : ''; } -- 2.43.5