help-make
[Top][All Lists]
Advanced

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

I am not understanding .SECONDEXPANSION :(


From: Mark Galeck (CW)
Subject: I am not understanding .SECONDEXPANSION :(
Date: Fri, 23 Mar 2012 08:05:38 -0700

Hello,

This works:


.PHONY: foobar%
OBJS := foobar0 foobar1

%: $(filter $*%,$(OBJS))
        @echo $@: $^

$(MAKEFILE_LIST) $(OBJS): ;


I get:
>make foobar
foobar: foobar0 foobar1

which is what I want.  


So then why doesn't this work the same way:


.PHONY: foobar%
.SECONDEXPANSION:

%: $$(filter $$*%,$$(OBJS))
        @echo $@: $^

OBJS := foobar0 foobar1

$(MAKEFILE_LIST) $(OBJS): ;



This is embarrassing,

Mark



reply via email to

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