help-make
[Top][All Lists]
Advanced

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

Re: Help with multiple dependencies in pattern rules


From: Paul Smith
Subject: Re: Help with multiple dependencies in pattern rules
Date: Mon, 08 Feb 2010 10:10:27 -0500

On Mon, 2010-02-08 at 16:22 +0200, Oleksandr Gavenko wrote:
> On 2010.02.08 16:03, Paul Smith wrote:
> > Second, every pattern rule MUST have a command with it.  If a pattern
> > rule has no command, then it actually deletes the pattern rule; so your
> > second line has no effect anyway (it's deleting that pattern rule).
> >
> So if I now that .x file include .y and:
> 
> %.x: %.y        # just specify dependency
> 
> %.x: %.z %.zz   # how build .x
>      $(xcompiler) -o $@ $^
> 
> when I touch my.y my.x is not rebuilded?

Correct.

> Or pattern rule without command is illegal?

It's not illegal, it just doesn't do what you want it to do here.  As I
said above, a pattern rule without a command DELETES the pattern rule
(this is how you can get rid of pattern rules you don't want).

Again, this is all described in the GNU make manual.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.net
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist





reply via email to

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