From patchwork Tue Jun 25 08:51:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 167688 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp5275676ilk; Tue, 25 Jun 2019 01:52:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxq9cIm/FkyoTWTaCY/6BkdQvhWWd6ztADZRMZTe0Pp/5pn51OYsnbVnro+7qqK/9Ao9XcV X-Received: by 2002:a17:902:6848:: with SMTP id f8mr22916086pln.102.1561452779469; Tue, 25 Jun 2019 01:52:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561452779; cv=none; d=google.com; s=arc-20160816; b=tghw9jJ5bn7NVLGB014OqENqiNs+7rMx6Bu2zTblHX5f0ES9TVd5BSJ/QV41BEsFh3 CsWDDde3fu7Lr8t4X3F3zd7THtifekb/R0viLJ0zFpSwpkXMzNQ5wCzT3IcHVzbs/DhD EEmtHnzgdTzRDKrjziocFx+1NwBO7azOfQokjc1i6wF2tUbk0U2I5vGzqoxTnP4PUkPx yUGj9ePTf4fmgcPKCtJh7OoUXW0bfVUEZjBJKtGrMFOxozmE2z/wfaX8RY3Yu6w9a/5R Jwo2w0L4UBOqGJ8X4C6GJmA36ydU4Bo7mhWcgLzgJZoFE+HsVIwjmyuu7GA/hyhonYQ3 bIYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=YXVIKxWcP6nUMETBeMDBbVPvinAIc3GMcFygU3uYYac=; b=XZ6Y+5FH/T0pJoVDqqmHInfieT/OIWWihntlOM4WL1On4A/IbfP2uPJbv4lYa+TO3j 8lu0kOhgCXD2HCrCDmU1zAVq2cZvGR0xxnUSmq/2eSOSaFiFXA+a3GSMkgLTtyw3I52n 1vvlguYJf/qtFHQjbRN3WdPnq55BWX29Z/WyToyd4aJg2MgYUs51bK0WV4jHxx0iOy6c xjg5gbN+IdDQsdcxDvE7/krOER5PRxCq0P9Bojvb4RsMVOGc3tRcxAjmVqg6LhSP8z5N jFUaSr0uYUshWu6z4g5FVq4+eRCPNX+bpDz5xor0dlRQvjeUUTm0uvM7l+fu8zHstBPf T1vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=zYLTQY6f; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m63si13386920pld.385.2019.06.25.01.52.59; Tue, 25 Jun 2019 01:52:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=zYLTQY6f; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731091AbfFYIw5 (ORCPT + 30 others); Tue, 25 Jun 2019 04:52:57 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:24772 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730788AbfFYIwy (ORCPT ); Tue, 25 Jun 2019 04:52:54 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id x5P8pmsS025960; Tue, 25 Jun 2019 17:51:49 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com x5P8pmsS025960 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1561452709; bh=YXVIKxWcP6nUMETBeMDBbVPvinAIc3GMcFygU3uYYac=; h=From:To:Cc:Subject:Date:From; b=zYLTQY6fXCrf0iusxvNAL8sGTmK4EWYgwmvFKhve7X5mSYbZ0JNLeXXMySQiR1mYp GHNkUgwlbsfSLWS6mR5snYWfpH0V3LOkxgNKZPpmQ5zwUA2bUJBW4OkEIy9q0dpu5h 1PDikpIU0prTlseMfmUGieSR5A/ueJzOW5G50yAUvCjxcDdksw9+2lRCByIVWMKlLd CfWqzO9LMY5H2qqdCxCzK6efBVtzP1VX5/LNHph3vbrt4I4HFMolQzTSEFbhL1F2AQ oewaN6M7ur6C5L1RV2oej/oio9wKkbOeY20sjIYMNH8Uomg2KqWo+FpZey3sjR2hAi IX4VX8tHps0LA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Christoph Hellwig , Herbert Xu , Sam Ravnborg , Xi Wang , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH] kbuild: add more hints about SUBDIRS replacement Date: Tue, 25 Jun 2019 17:51:27 +0900 Message-Id: <20190625085127.9446-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 0126be38d988 ("kbuild: announce removal of SUBDIRS if used") added a hint about the 'SUBDIRS' replacement, but it was not clear enough. Multiple people sent me similar questions, patches. https://lkml.org/lkml/2019/1/17/456 I did not mean to suggest M= for building a subdirectory in the kernel tree. >From the commit 669efc76b317 ("net: hns3: fix compile error"), people already (ab)use M=... to do that because it seems to work to some extent. Documentation/kbuild/kbuild.txt says M= and KBUILD_EXTMOD are used for building external modules. In fact, Kbuild supports the single target '%/' for this purpose, but this may not be noticed much. Kindly add more hints. Makefile:213: ================= WARNING ================ Makefile:214: 'SUBDIRS' will be removed after Linux 5.3 Makefile:215: Makefile:216: If you are building an individual subdirectory Makefile:217: in the kernel tree, you can do like this: Makefile:218: $ make path/to/dir/you/want/to/build/ Makefile:219: (Do not forget the trailing slash) Makefile:220: Makefile:221: If you are building an external module, Makefile:222: Please use 'M=' or 'KBUILD_EXTMOD' instead Makefile:223: ========================================== Suggested-by: Christoph Hellwig Signed-off-by: Masahiro Yamada --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.17.1 Acked-by: Sam Ravnborg diff --git a/Makefile b/Makefile index 7a7c17eb0cbf..823a39d940c6 100644 --- a/Makefile +++ b/Makefile @@ -212,6 +212,13 @@ endif ifdef SUBDIRS $(warning ================= WARNING ================) $(warning 'SUBDIRS' will be removed after Linux 5.3) + $(warning ) + $(warning If you are building an individual subdirectory) + $(warning in the kernel tree, you can do like this:) + $(warning $$ make path/to/dir/you/want/to/build/) + $(warning (Do not forget the trailing slash)) + $(warning ) + $(warning If you are building an external module,) $(warning Please use 'M=' or 'KBUILD_EXTMOD' instead) $(warning ==========================================) KBUILD_EXTMOD ?= $(SUBDIRS)