help-make
[Top][All Lists]
Advanced

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

Re: Odd rule issue


From: Paul Smith
Subject: Re: Odd rule issue
Date: Thu, 9 Dec 2010 17:03:05 -0500

On Thu, 2010-12-09 at 03:26 -0800, AdamWainwright wrote:
> PROGS=../xxx                                                                  
> 
> $(PROGS): $(addsuffix .y, $(@F))
>         cp $(@F).y $@

You can't use $@ in the prerequisite lists; that value is not set until
much later when make actually tries to invoke the rule.

In this case you want to use pattern rules, most likely.

If you really want to do this you can enable .SECONDEXPANSION then use
$$(@F:%=%.y) or similar (see the GNU make manual.





reply via email to

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