Re: [PATCH 35/46] kbuild: change kbuild to not rely on incorrect GNU make behavior

Paul D. Smith
2006-03-21T17:37:24Z

%% Jan-Benedict Glaw <jbglaw@lug-owl.de> writes:

jg> On Tue, 2006-03-21 17:20:57 +0100, Sam Ravnborg <sam@ravnborg.org> wrote:

>> -.PHONY: tar%pkg
>> +PHONY += tar%pkg

jg> This part is wrong. $(PHONY) isn't subject to pattern matching,

You're correct that it won't do what the author apparently expected,
however it WILL do exactly what the previous versions of kbuild used
to do.

I wrote:

> To: Sam Ravnborg <sam@ravnborg.org>
> Cc: linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] change kbuild to not rely on incorrect GNU make behavior
> From: "Paul D. Smith" <psmith@gnu.org>
> Date: Sun, 5 Mar 2006 19:41:07 -0500
...
> Note that this won't do what you expect. tar%pkg is a pattern rule,
> but .PHONY doesn't take patterns so you're declaring the actual file
> named literally 'tar%pkg' to be phony.

jg> so all targets that match 'tar%pkg' must be listed
jg> here. Fortunately, that's only three:

jg> PHONY += tar-pkg targz-pkg tarbz2-pkg

This would be more correct, indeed; but note this change is orthogonal
to the purpose and requirements of the patch provided.

Of course, that doesn't mean they shouldn't be combined if that's
acceptable to the patch-masters! :-).

Cheers!

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