From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B116C00145 for ; Mon, 12 Dec 2022 17:21:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232590AbiLLRVS (ORCPT ); Mon, 12 Dec 2022 12:21:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231194AbiLLRVO (ORCPT ); Mon, 12 Dec 2022 12:21:14 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C45C60F1; Mon, 12 Dec 2022 09:21:13 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 214B860F80; Mon, 12 Dec 2022 17:21:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 341A3C433D2; Mon, 12 Dec 2022 17:21:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670865672; bh=SjqVDmbIgQ90Gj/CuVJ2qW4208M6r7Sx8Km8aUFKiMo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=A3T49RDi0UVpofh4afireWECmHKDdm5gH+HSwuiMKkjE4PzHGD6ywFiEBntFsr9Gt dIh0YoQYzuH0dBG7gj7rNKxf906zM+46VlHcQNpm1tijboRZPy2DPZCl6gRuY0cXRl dO05+5FjYX8TlmlPclSQbJjA4cBBlkYNU1r2k0RLupiO7t0j277i41FerDQw5R4LCg xcGFRtr2eQKHAWuzTiv78zAo3QbwJ433fNTGGM6K59oVmReePIqzyfVwQY3RwIeVVE Kdtnexiv34VwO4kKZr6uWZgV9f/6nWJRuDkdLM5G2kX2BgAqLPxenLItnBUQ+xZecr Nq1wnTpDI/z7w== Date: Mon, 12 Dec 2022 10:21:10 -0700 From: Nathan Chancellor To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Nick Desaulniers , Nicolas Schier Subject: Re: [PATCH] kbuild: ensure Make >= 3.82 is used Message-ID: References: <20221211030352.2622425-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221211030352.2622425-1-masahiroy@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 11, 2022 at 12:03:52PM +0900, Masahiro Yamada wrote: > Documentation/process/changes.rst notes the minimal GNU Make version, > but it is not checked anywhere. > > We could check $(MAKE_VERSION), but another simple way is to check > $(.FEATURES) since the feature list always grows although this way > is not always possible. For example Make 4.0 through 4.2 have the > same set of $(.FEATURES). > > Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor > --- > > Changes in v3: > - Check the version in a different way > > Makefile | 5 +++++ > 1 file changed, 5 insertions(+) > > 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 > +ifeq ($(filter undefine,$(.FEATURES)),) > +$(error Make $(MAKE_VERSION) is too old) Would it make sense to state what version is needed, similar to the Kconfig checks for compiler and binutils? > +endif > + > $(if $(filter __%, $(MAKECMDGOALS)), \ > $(error targets prefixed with '__' are only for internal use)) > > -- > 2.34.1 >