help-make
[Top][All Lists]
Advanced

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

.SECONDEXPANSION and patsubst


From: Martin d'Anjou
Subject: .SECONDEXPANSION and patsubst
Date: Wed, 15 Sep 2010 10:10:29 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1

 Hi,

I do not understand this .SECONDEXPANSION problem with patsubst. It
seems patsubst has no effect. Here is the code:
.SECONDEXPANSION:
test_foo_core := core_bar
core_%:
        @echo CORE $@
test_%: core_$$(patsubst core_%,%,$$(test_$$*_core))
        @echo TEST $@

And how it executes:
$ make test_foo
CORE core_core_bar <<<<<< actual result core_core_bar
TEST test_foo

Expected result:
CORE core_bar <<<<<<< expected result, core_bar
TEST test_foo

I expect $(patsubst) to chop off the leading "core_" and to see
"core_bar", and not "core_core_bar".

I am sure it is something very simple, but after many hours of working
on this, another pair of eyes would be much appreciated!

Regards,
Martin


The information and any attached documents contained in this message
may be confidential and/or legally privileged.  The message is
intended solely for the addressee(s).  If you are not the intended
recipient, you are hereby notified that any use, dissemination, or
reproduction is strictly prohibited and may be unlawful.  If you are
not the intended recipient, please contact the sender immediately by
return e-mail and destroy all copies of the original message.



reply via email to

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