automake-ng
[Top][All Lists]
Advanced

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

[Automake-NG] [FYI] [ng] cleanup: remove unused function 'scan_variable_


From: Stefano Lattarini
Subject: [Automake-NG] [FYI] [ng] cleanup: remove unused function 'scan_variable_expansions'
Date: Thu, 10 May 2012 13:15:57 +0200

* lib/Automake/Variable.pm (scan_variable_expansions): Delete, it's
not used anymore since commit 'v1.11-1779-g9a82dcd' of 2012-02-23,
"[ng] vars: don't warn about non-POSIX names or GNU make function calls".

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

diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index ab9baad..983921c 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -727,35 +727,6 @@ sub dump ($)
 
 =over 4
 
-=item C<@list = scan_variable_expansions ($text)>
-
-Return the list of variable names expanded in C<$text>.  Note that
-unlike some other functions, C<$text> is not split on spaces before we
-check for subvariables.
-
-=cut
-
-sub scan_variable_expansions ($)
-{
-  my ($text) = @_;
-  my @result = ();
-
-  # Strip comments.
-  $text =~ s/#.*$//;
-
-  # Record each use of ${stuff} or $(stuff) that does not follow a $.
-  while ($text =~ /(?<!\$)\$(?:\{([^\}]*)\}|\(([^\)]*)\))/g)
-    {
-      my $var = $1 || $2;
-      # The occurrence may look like $(string1[:subst1=[subst2]]) but
-      # we want only 'string1'.
-      $var =~ s/:[^:=]*=[^=]*$//;
-      push @result, $var;
-    }
-
-  return @result;
-}
-
 =item C<Automake::Variable::define($varname, $owner, $type, $cond, $value, 
$comment, $where, $pretty)>
 
 Define or append to a new variable.
-- 
1.7.9.5




reply via email to

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