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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DEA1C48BD3 for ; Wed, 26 Jun 2019 14:30:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 628C12133F for ; Wed, 26 Jun 2019 14:30:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728110AbfFZOax (ORCPT ); Wed, 26 Jun 2019 10:30:53 -0400 Received: from asavdk3.altibox.net ([109.247.116.14]:39708 "EHLO asavdk3.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726628AbfFZOav (ORCPT ); Wed, 26 Jun 2019 10:30:51 -0400 Received: from ravnborg.org (unknown [158.248.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk3.altibox.net (Postfix) with ESMTPS id A684C2003C; Wed, 26 Jun 2019 16:30:47 +0200 (CEST) Date: Wed, 26 Jun 2019 16:30:46 +0200 From: Sam Ravnborg To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, Christoph Hellwig , Herbert Xu , Xi Wang , Michal Marek , linux-kernel@vger.kernel.org Subject: Re: [PATCH] kbuild: add more hints about SUBDIRS replacement Message-ID: <20190626143046.GA12510@ravnborg.org> References: <20190625085127.9446-1-yamada.masahiro@socionext.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190625085127.9446-1-yamada.masahiro@socionext.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=dqr19Wo4 c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=D19gQVrFAAAA:8 a=c-n4J4-pAAAA:8 a=7gkXJVJtAAAA:8 a=Sq-7mj1JxeWlg5ll3zAA:9 a=CjuIK1q_8ugA:10 a=W4TVW4IDbPiebHqcZpNg:22 a=L0NDqeB7ZLmQzAogN4cw:22 a=E9Po1WZjFZOl8hwRPBS3:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 25, 2019 at 05:51:27PM +0900, Masahiro Yamada wrote: > 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 Nice! Acked-by: Sam Ravnborg Sam