From patchwork Sun Dec 11 03:03:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13070483 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 3C52DC4332F for ; Sun, 11 Dec 2022 03:04:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229568AbiLKDED (ORCPT ); Sat, 10 Dec 2022 22:04:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229538AbiLKDEC (ORCPT ); Sat, 10 Dec 2022 22:04:02 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B2D8FD37; Sat, 10 Dec 2022 19:04:02 -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 ams.source.kernel.org (Postfix) with ESMTPS id BBC84B80937; Sun, 11 Dec 2022 03:04:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13B32C433EF; Sun, 11 Dec 2022 03:03:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670727839; bh=KRNswHAYO1IcuR9kG0iBZlhOuhjVaWb06YuN0ImwPlE=; h=From:To:Cc:Subject:Date:From; b=cIJtLunhw2FQPzxttbW8f+vSGCrdQiBhGtcgwyNa6vH/80dogQvDn3eDg0d4p45nV /GDnjqqHgwbrFLkdC2pZofiaByQrBWWT7SOjUf6PmB3Kbsib5d9vMIva32cTVTwI38 KWEE2cWUhKPQCCwJROjnYlUej+mlGyK12hyq+VpqQGfwnjIBxVCMZPQB0dQV8PBKm8 F4cbP4IujgmRZ39TRQr44r70fogKnMqC2dTNnGAF9pb0ns6kWEAc8sh4pN9XNV0MK0 7H23efSSwnevuGV05ag2WMTwLaPL2aDUoBFVEaPH695IyBAtlLIRe9y/b3xzcXPX2k BEJihBtEgnZrA== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier Subject: [PATCH] kbuild: ensure Make >= 3.82 is used Date: Sun, 11 Dec 2022 12:03:52 +0900 Message-Id: <20221211030352.2622425-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org 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 Reviewed-by: Nicolas Schier --- 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) +endif + $(if $(filter __%, $(MAKECMDGOALS)), \ $(error targets prefixed with '__' are only for internal use))