[Top][All Lists]
[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
- Re: [Automake-NG] [PATCH 05/15] [ng] tests: Automake should let us append to undefined variables (someday), (continued)
[Automake-NG] [PATCH 07/15] [ng] VarDef: store comments and values as a perl array, Stefano Lattarini, 2012/05/25
[Automake-NG] [PATCH 03/15] [ng] vars: get rid of VAR_SILENT type, Stefano Lattarini, 2012/05/25
[Automake-NG] [PATCH 08/15] [ng] vars: simplify logic for appending conditionally, Stefano Lattarini, 2012/05/25
[Automake-NG] [PATCH 06/15] [ng] refactor: support comments only for VarDef, not for ItemDef too, Stefano Lattarini, 2012/05/25
[Automake-NG] [PATCH 09/15] [ng] vars: keep track of conditionals in appended values and comments, Stefano Lattarini, 2012/05/25
[Automake-NG] [PATCH 11/15] [ng] refactor: change signature of 'define_variable()', Stefano Lattarini, 2012/05/25
[Automake-NG] [PATCH 13/15] [ng] rename: define_pretty_variable -> define_cond_variable(), Stefano Lattarini, 2012/05/25
[Automake-NG] [PATCH 10/15] [ng] vars: get rid of VAR_ASIS / VAR_PRETTY distinction, Stefano Lattarini, 2012/05/25
[Automake-NG] [PATCH 15/15] [ng] vars: remove some safety checks in Automake::Variable::define,
Stefano Lattarini <=
[Automake-NG] [PATCH 12/15] [ng] cleanup: prefer 'define_variable' over 'define_pretty_variable', Stefano Lattarini, 2012/05/25
[Automake-NG] [PATCH 14/15] [ng] cosmetics: avoid redundant use of '&' in subroutine calls, Stefano Lattarini, 2012/05/25