help-make
[Top][All Lists]
Advanced

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

Re: Making rules print $


From: David A. Greene
Subject: Re: Making rules print $
Date: Tue, 14 Aug 2007 23:09:57 -0500
User-agent: KMail/1.9.5

On Tuesday 14 August 2007 22:59, David A. Greene wrote:

> Here's something closer to what I have to do (the actual
> code is much more complicated):
>
> define some_func
>
> target: $$($(1))
>       echo '$$' > $$@
> endef
>
> my_func = $(eval $(call some_func,$(1)))
>
> The $$' gets evaluated by the eval and thus disappears, causing a shell
> parse error:

And of course I didn't try one more $.  This works:

define some_func

target: $$($(1))
        echo '$$$$' > $$@
endef

my_func = $(eval $(call some_func,$(1)))

TARGET := all

all:
        @echo Done!

$(call my_func,TARGET)

                                            -Dave




reply via email to

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