]> sourceware.org Git - automake.git/commitdiff
* automake.in (&macro_define): The user is allowed to override
authorAkim Demaille <akim@epita.fr>
Mon, 9 Apr 2001 09:36:48 +0000 (09:36 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 9 Apr 2001 09:36:48 +0000 (09:36 +0000)
a value if it was set by Automake, or if it was found in AC_SUBST.

ChangeLog
automake.in

index 7f6a5a89eaaa1b4f492d187f3de3730059f44cc8..2dc510c12ab2ab237404666aa8f1fa1b18a20725 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-09  Akim Demaille  <akim@epita.fr>
+
+       * automake.in (&macro_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  <akim@epita.fr>
 
        * automake.in (&handle_source_transform): Better locality of the
index 06b6183f84c19aba3935073160fddead19d55d08..55f6a6b20f7e50cf99af239872321968c2e8106a 100755 (executable)
@@ -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 ':') ? ':' : '';
 }
 
 
This page took 0.048783 seconds and 5 git commands to generate.