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

From: Paul D. Smith
Date: Tue Mar 21 2006 - 12:34:34 EST


%% Jan-Benedict Glaw <jbglaw@xxxxxxxxxx> writes:

jg> On Tue, 2006-03-21 17:20:57 +0100, Sam Ravnborg <sam@xxxxxxxxxxxx> 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@xxxxxxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH] change kbuild to not rely on incorrect GNU make behavior
> From: "Paul D. Smith" <psmith@xxxxxxx>
> 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@xxxxxxx> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/