help-make
[Top][All Lists]
Advanced

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

RE: I am not understanding .SECONDEXPANSION :(


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

Never mind.

What I wanted to do, is, if I have a pool of possible goals, like : foobar0 and 
foobar1 for example, then I wanted to be able to do 

>make foobar

and that would make any matching goal with that prefix.

So there I tried to do this strange

%: $(filter $*%...)

Which "seemed" to work, except not for .SECONDEXPANSION.  Nonsense.

The correct way is

$(foreach var,$(MAKECMDGOALS),$(eval $(var):$(filter $(var)%,$(GOALS))))

Mark



reply via email to

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