"Paul D. Smith" <[EMAIL PROTECTED]> wrote ...
>
> OK, I fixed this.
> OK, I fixed this.
> OK, I fixed this.
> OK, I fixed this.
:)
> mm> *) I think there is a bug w.r.t. target specific variables, at least my
> mm> code doesnt work.
>
> mm> If this is really a bug my guess is that the definition of the
> mm> target-specific variable uses the "global variable database" instead
> mm> of the "current DB" (which is used for the rule's targets and for
> mm> its prerequisites).
>
> Hmm. This is a tricky one. I think it is a bug; can you submit it to
> the make bug tracker in Savannah so we don't lose track of it?
Ok, is submitted. Meanwhile I found a simple systematic workaround for it
in my current makefile: all such 'fuction parameters' are now passed using
local vars with a dumb name, but then immediately assigned to a global
var, which then is used inside this function [and all its sub-functions]:
define mkRuleForE
e := $x
#"e" must be well-known global variable,
# and reliably NEVER local in our call-stack.
$(warning Inside function mkRuleForE: e = $(e))
.PHONY: $(e)Target
all: $(e)Target
$(e)Target: e := $(e)
$(e)Target: ; @echo Making target $@ //"e" = "$(e)"
endef
...
$(foreach x,e2 e3,$(eval $(value mkRuleForE)))
Regards,
Markus.
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make