[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
a possible make parsing bug in complicated foreach function define?
From: |
Sandy Currier |
Subject: |
a possible make parsing bug in complicated foreach function define? |
Date: |
Fri, 21 May 2004 13:24:58 -0400 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) |
Hi all,
This happens on my ~2month old build of the CVS tip for gmake 3.81beta1.
The top level problem is that the following function definition is not
parsed correctly when the variable on the left side of the ':=' (in
the foreach line) contains a '|'. When the variable name does not
contain a '|', the function appears to eval as desired.
Or at least this is what I think is going on by looking at the output of
"make ... -npq".
Without the '|', the '$(2)ALL_CFILES_linux' gets set to the correct and
expected
value when the function is called. The dump of the database shows this:
$(2)ALL_CFILES_linux := <blah blah blah>
With the '|' in the left hand side of the ':=', the value of
'$(2)|ALL_CFILES_linux'
(note that '|' is now in the name), make is intepreting the foreach line
as a target
statement, as in:
$(2)|ALL_CFILES_linux: = <blah blah blah>
At least a dump of the database shows that the function block ends up
defining a
target rule as opposed to an immediate variable definition.
?
thanks!
-sandy
define SECTION_7_MODULE_ACCUMULATE_BLOCK
# $(1) = dira/dirb (parent directory)
# $(2) = dira/dirb/dirc (this directory)
# accumulators
$$(foreach platform,$(PLATFORMS),$(2)|ALL_CFILES_$$(platform) :=
$$(_LOCAL_CFILES_$$(platform)) $$($(2)|ALL_CFILES_$$(platform)))
endef
- a possible make parsing bug in complicated foreach function define?,
Sandy Currier <=