]> sourceware.org Git - automake.git/commitdiff
For PR automake/353:
authorAlexandre Duret-Lutz <adl@gnu.org>
Tue, 17 Sep 2002 21:33:35 +0000 (21:33 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Tue, 17 Sep 2002 21:33:35 +0000 (21:33 +0000)
* automake.in (check_ambiguous_conditional): Display locations for
the two definitions of the ambiguous variable.  Show the macro_dump
output in --verbose only.  Accept $where as a third argument,
(macro_define): Pass $where.

ChangeLog
automake.in

index 0fb91818fe1fc2f3a2ad3cb12dda2d8021dd5063..1d47efeac5efd798a2ed8cc7beb9b38124372c1a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2002-09-17  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
+       For PR automake/353:
+       * automake.in (check_ambiguous_conditional): Display locations for
+       the two definitions of the ambiguous variable.  Show the macro_dump
+       output in --verbose only.  Accept $where as a third argument,
+       (macro_define): Pass $where.
+
        * automake.in (handle_programs): Ooops.  Really add LDADD
        objects into _DEPENDENCIES.
        * tests/libobj12.test: Check for it.
index 5fa9086afc821533e8c2cca8af70957cdbf12004..5e42fb54cc36b472e9fe44d04b2eca29aa2bb2cf 100755 (executable)
@@ -6030,19 +6030,23 @@ sub cond_stack_endif ($$$)
 ## ------------------------ ##
 
 
-# check_ambiguous_conditional ($VAR, $COND)
-# -----------------------------------------
+# check_ambiguous_conditional ($VAR, $COND, $WHERE)
+# -------------------------------------------------
 # Check for an ambiguous conditional.  This is called when a variable
 # is being defined conditionally.  If we already know about a
 # definition that is true under the same conditions, then we have an
 # ambiguity.
-sub check_ambiguous_conditional ($$)
+sub check_ambiguous_conditional ($$$)
 {
-  my ($var, $cond) = @_;
+  my ($var, $cond, $where) = @_;
   my ($message, $ambig_cond) =
     conditional_ambiguous_p ($var, $cond, keys %{$var_value{$var}});
-  err_var $var, "$message\n" . macro_dump ($var)
-    if $message;
+  if ($message)
+    {
+      err $where, "$message ...";
+      err_var ($var, "... `$var' previously defined here.");
+      verb (macro_dump ($var));
+    }
 }
 
 # $STRING, $AMBIG_COND
@@ -6338,7 +6342,7 @@ sub macro_define ($$$$$$)
          # There must be no previous value unless the user is redefining
          # an Automake variable or an AC_SUBST variable for an existing
          # condition.
-         check_ambiguous_conditional ($var, $cond)
+         check_ambiguous_conditional ($var, $cond, $where)
            unless (exists $var_value{$var}{$cond}
                    && (($var_owner{$var} == VAR_AUTOMAKE
                         && $owner != VAR_AUTOMAKE)
This page took 0.040256 seconds and 5 git commands to generate.