help-make
[Top][All Lists]
Advanced

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

Re: quoting $$ (or something completely different?)


From: Tom Bachmann
Subject: Re: quoting $$ (or something completely different?)
Date: Sat, 01 Apr 2006 13:47:05 +0200
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051031)

[sorry for triple reply]

Tom Bachmann wrote:
But there is one more thing: doing what you proposed would introduce a completely new style of writing makefiles into my project, and I'd be happy not to do this. I'd be very happy to defer the call to SET instead of doing the assignment earlier. Do you have an idea how to do this?

this seems to work and I guess I understand why it does, but I'm still wondering if the second parameter for set can be avoided.

NAME = $(subst /,_,$(1))

-----------------------------------
define SET
$(2)_$(1) := $$($(1))
endef

define FOO
CFLAGS := foo bar baz foo2
$(call SET,CFLAGS,$(NAME))
endef

$(eval $(call FOO,foo/bar))

all:
        @echo '$(foo_bar_CFLAGS)'
-----------------------------------
--
-ness-




reply via email to

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