automake-ng
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-NG] [PATCH 15/15] [ng] vars: remove some safety checks in Auto


From: Stefano Lattarini
Subject: [Automake-NG] [PATCH 15/15] [ng] vars: remove some safety checks in Automake::Variable::define
Date: Fri, 25 May 2012 13:38:37 +0200

The would only get in the way of future refactorings.  Note that with
this change we don't lose potential diagnostic for the user, but only
safety check for the Automake's private '.am' fragments, so we don't
introduce any regression here (assuming we won't break our own '.am'
files ;-)

* lib/Automake/Variable.pm (define): Allow a variable of type VAR_AUTOMAKE
to be "redefined" with different types (i.e., it can now be first defined
with '=' and later augmented with '+=', without Automake complaining about
that; previously, only variables defined with '+=' could be augmented in
the same way.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 lib/Automake/Variable.pm |   12 ------------
 1 file changed, 12 deletions(-)

diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index fb59f4f..f154b43 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -751,18 +751,6 @@ sub define ($$$$$$$)
   # Additional checks for Automake definitions.
   if ($owner == VAR_AUTOMAKE && ! $new_var)
     {
-      # An Automake variable must be consistently defined with the same
-      # sign by Automake.
-      if ($def->type ne $type && $def->owner == VAR_AUTOMAKE)
-       {
-         error ($def->location,
-                "Automake variable '$var' was set with '"
-                . $def->type . "=' here ...", partial => 1);
-         error ($where, "... and is now set with '$type=' here.");
-         prog_error ("Automake variable assignments should be consistently\n"
-                     . "defined with the same sign");
-       }
-
       # If Automake tries to override a value specified by the user,
       # just don't let it do.
       if ($def->owner != VAR_AUTOMAKE)
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]