help-make
[Top][All Lists]
Advanced

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

Re: implicit rule problem


From: Paul Smith
Subject: Re: implicit rule problem
Date: Tue, 17 Feb 2009 09:13:15 -0500

On Tue, 2009-02-17 at 00:39 -0800, Ajeet Grewal wrote:
> Hey guys,
> 
> This is my make file.
> 
> << Makefile start >>
> %.b:
>      ls -al
> 
> %.a: %.b
> << Makefile end >>
> 
> If I try "make a.a", I get "no rule to make target a.a".

It's not possible to define a pattern rule with no recipe at all.  That
means "delete this pattern".  See the GNU make manual section on pattern
rules.

You need to add a recipe to the "%.a : %.b" rule; even a do-nothing
recipe.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.us
 "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]