[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
More on problem with makefile variable expansion
From: |
Ray Simard |
Subject: |
More on problem with makefile variable expansion |
Date: |
Wed, 30 Jun 2004 21:05:41 -0700 |
User-agent: |
Mozilla Thunderbird 0.5+ (X11/20040212) |
Earlier I wrote about a problem with expansion of makefile variables.
The overall problem is not specifically with the dependency-tracking
code as I had mentioned; that's just where it turned up.
What is happening is, variables that are concatenated with literals are
not being recognized by Automake as variables. The regex at line 1304
insists that $val consist of the variable and the variable only.
Something like $(foo).cpp is not seen as a variable because it doesn't
consist of exactly $(xxx).
I don't know what you may wish to do about it, either to change it or
document it as a limitation; but anyway, here it is, FYI.
Ray Simard
address@hidden
1296 my @to_process = $var->value_as_list ($cond, $parent, $parent_cond);
1297 while (@to_process)
1298 {
1299 my $val = shift @to_process;
1300 # If $val is a variable (i.e. ${foo} or $(bar), not a filename),
1301 # handle the sub variable recursively.
1302 # (Backslashes before `}' and `)' within brackets are here to
1303 # please Emacs's indentation.)
1304 if ($val =~ /^\$\{([^\}]*)\}$/ || $val =~ /^\$\(([^\)]*)\)$/)
1305 {
1306 my $subvarname = $1;
1307
1308 # If the user uses a losing variable name, just ignore it.
1309 # This isn't ideal, but people have requested it.
1310 next if ($subvarname =~ /address@hidden@/);
1311
1312 # See if the variable is actually a substitution reference
1313 my ($from, $to);
1314 # This handles substitution references like ${foo:.a=.b}.
1315 if ($subvarname =~ /^([^:]*):([^=]*)=(.*)$/o)
1316 {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- More on problem with makefile variable expansion,
Ray Simard <=