help-make
[Top][All Lists]
Advanced

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

Re: A question on implicit rules


From: Greg Chicares
Subject: Re: A question on implicit rules
Date: Wed, 11 Feb 2004 09:30:08 -0500

Paolo Gai wrote:
> 
[...]
> begin----------------------------
> A%: B/C%D
>         @echo A$*
> 
> B/C%D:
>         @echo B/C$*D
> end----------------------------
['make A2' does what you'd expect. But if you delete
the command for the A% rule, it says:]
> make: *** No rule to make target `A2'.  Stop.

I think this is equivalent to the simpler case of
a makefile that contains only this line:

A%:

when no file 'A2' exists.

Then shouldn't 'make A2' fail, because there's no command
for make to update file 'A2'? What behavior would be better?

Perhaps "Implicit rule has no commands to update target 'A2'"
would be more informative. But I think 'make' is behaving as
documented: see step four in 'Implicit Rule Search Algorithm'
in the gnu make manual.




reply via email to

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