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 <[email protected]>          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



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to