From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 09 Nov 2017 17:08:55 +0100 (CET) Received: from asavdk4.altibox.net ([109.247.116.15]:43265 "EHLO asavdk4.altibox.net" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23990757AbdKIQItTHWLX (ORCPT ); Thu, 9 Nov 2017 17:08:49 +0100 Received: from ravnborg.org (126.158-248-196.customer.lyse.net [158.248.196.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id CCC748031C; Thu, 9 Nov 2017 17:08:39 +0100 (CET) Date: Thu, 9 Nov 2017 17:08:38 +0100 From: Sam Ravnborg To: Masahiro Yamada Cc: Linux Kbuild mailing list , Rob Herring , Mark Rutland , Pantelis Antoniou , devicetree@vger.kernel.org, Arnd Bergmann , Linux-MIPS , Linux Kernel Mailing List , Michal Marek , Michal Marek Subject: Re: [PATCH 1/2] kbuild: create built-in.o automatically if parent directory wants it Message-ID: <20171109160838.GA26703@ravnborg.org> References: <1510072307-16819-1-git-send-email-yamada.masahiro@socionext.com> <1510072307-16819-2-git-send-email-yamada.masahiro@socionext.com> <20171109053529.GA12717@ravnborg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.2 cv=eqGd9chX c=1 sm=1 tr=0 a=ddpE2eP9Sid01c7MzoqXPA==:117 a=ddpE2eP9Sid01c7MzoqXPA==:17 a=kj9zAlcOel0A:10 a=7gkXJVJtAAAA:8 a=701pLY4DsI3V8-De6tgA:9 a=CjuIK1q_8ugA:10 a=E9Po1WZjFZOl8hwRPBS3:22 Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 60810 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: sam@ravnborg.org Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips Hi Masahiro. On Thu, Nov 09, 2017 at 02:53:04PM +0900, Masahiro Yamada wrote: > Hi Sam, > > Thanks for your review. > > 2017-11-09 14:35 GMT+09:00 Sam Ravnborg : > > Hi Masahiro. > > > > Thanks for picking this up. > > > >> A key point is, the parent Makefile knows whether built-in.o is needed > >> or not. If a subdirectory needs to create built-in.o, its parent can > >> tell the fact when Kbuild descends into it. > > Good observation! > >> > >> diff --git a/Makefile b/Makefile > >> index 008a4e5..cc0b618 100644 > >> --- a/Makefile > >> +++ b/Makefile > >> @@ -1003,7 +1003,7 @@ $(sort $(vmlinux-deps)): $(vmlinux-dirs) ; > >> > >> PHONY += $(vmlinux-dirs) > >> $(vmlinux-dirs): prepare scripts > >> - $(Q)$(MAKE) $(build)=$@ > >> + $(Q)$(MAKE) $(build)=$@ need-builtin=1 > > > > The need-bultin may also be required for the shortcuts > > that allows one to use: > > > > make / > > > > example: > > > > make net/ > > > I do not want to add need-builtin=1 for single targets. > > > make scripts/ > would create false scripts/built-in.o > This is odd. > > I wrote the solution in the commit log: > $(obj-y) should be still checked to support the single target "%/". I missed this bit in the commit log, but I almost commented on this in the patch itself. Good way to do it. Sam