=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.