]> sourceware.org Git - automake.git/commitdiff
* automake.in (&macro_define): Ignore Automake definition for
authorAkim Demaille <akim@epita.fr>
Thu, 12 Apr 2001 15:44:55 +0000 (15:44 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 12 Apr 2001 15:44:55 +0000 (15:44 +0000)
($var, $cond) if there is already a user definition for ($var, $cond).

ChangeLog
automake.in

index 515a3c3552ab3a82cab575fdbb4cda520572a9c4..486c1f40e57ca6a59a8593f04c0ccd52cec7ebcf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-12  Akim Demaille  <akim@epita.fr>
+
+       * automake.in (&macro_define): Ignore Automake definition for
+       ($var, $cond) if there is already a user definition for ($var, $cond).
+
 2001-04-12  Akim Demaille  <akim@epita.fr>
 
        * automake.in (&scan_texinfo_file): Catch @cindex and the like,
index da0850056182035eaf5a6d43dde0b97a88465722..7f305dc047c8edac75257f531e0da5efa03876d9 100755 (executable)
@@ -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.
This page took 0.049036 seconds and 5 git commands to generate.