Re: [PATCH] kbuild: ensure Make >= 3.82 is used

From: Nicolas Schier
Date: Thu Dec 15 2022 - 23:31:22 EST


On Wed 14 Dec 2022 11:05:10 GMT, David Laight wrote:
> From: Nicolas Schier
> > Sent: 13 December 2022 03:59
> ...
> > > > diff --git a/Makefile b/Makefile
> > > > index 2dda1e9a717a..66dfc5751470 100644
> > > > --- a/Makefile
> > > > +++ b/Makefile
> > > > @@ -11,6 +11,11 @@ NAME = Hurr durr I'ma ninja sloth
> > > > # Comments in this file are targeted only to the developer, do not
> > > > # expect to learn how to build the kernel reading this file.
> > > >
> > > > +# Ensure Make >= 3.82
>
> Wouldn't it be better to say either:
> # Ensure gmake supports 'undefine' (added in 3.82)
> or:
> # Building with gmake versions prior to 3.82 fails due to
> # bug 'brief description'.
> # Check for 'undefine' support as a surrogate for the bug fix.
>
> David

'undefine' is not the only feature that has been introduced in make
3.82 that we use, e.g. 'private' keyword is used in rust/Makefile but
'private' is not checkable via .FEATURES. Checking for 'undefine' in
.FEATURES is kind of a hack to detect make 3.82, but as written
earlier, it prevents doing other explicit version comparison like
$(filter-out 3.80 3.81 3.82 3.99.% $(filter 1.% 2.% 3.*)).

I think $(filter undefine,$(.FEATURES)),) is a sensible compromise.

Kind regards,
Nicolas

Attachment: signature.asc
Description: PGP signature