Received: by 10.223.185.116 with SMTP id b49csp7521529wrg; Thu, 1 Mar 2018 06:54:30 -0800 (PST) X-Google-Smtp-Source: AG47ELvNM0WLG5wAP80w+3EqqhflBPYH+tSklXEs+UeVRl/aVw6FJf9vdP5isEkBVkoLwF016SSy X-Received: by 10.98.12.149 with SMTP id 21mr2235962pfm.118.1519916070150; Thu, 01 Mar 2018 06:54:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519916070; cv=none; d=google.com; s=arc-20160816; b=QdyK4Z64D9vQwuYjbIaBzWwRv5Al4KPJooyoV5XAdHEEAlCnCF4pbYrAt87cDmnXhM pxrNlLzGTVxoDchdi0s1ZLgCEs/xoxzm8HZfX/pO46PfqbSX+DhynCknZGzzb6PsjQD+ UKuatVPxIN/axOigd27lZ/FqiPTCSopnu6tEm543y6Qp+nSqt1DJK84ooct89PsYTGYm 3u9e4Csx5XN+5yzI+pkmcz/SyRFxgixMvEinnpYjD0hnjQVQnY96XJSyjOhPpEwQ1LVQ 5fc6j0fq/osV0u5HLXSLpMb9UWdoxkHBN0kNFKJMabystTgI74Be/OiRDweJYu1+jPRa Kn+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=veBL25uFPGajaGx52PEYXrZ2DCVbNQHZgXzWmoEkqvU=; b=rdIULUCr0qyJgmWjlyf6gWqb/29EiXbkSTRpsH5VQgSYOl81okvvV3S5ataB2ipN2q FvJJd/CKiMfUN0ITtzlT4nFmY2RwA+j1vcVXEv71l8pRwqpa6raHp3w/qeUlzdQDZSOf 7HK+g0wITtFdooJZexhcSVviiOgEsxlLvwx2Y91DHTaruO2RtFlbqBpVxpRkW89n/szA UFLPJIzwZ/K+SY1UJKUcAj3lWx+Uux63Ri9IxL5ANu7KV7XjTFve4gmzueOT/OXg7hvB bjEHuzW6lpkFkJBLd97pfht77R4/By5n5v0Fe4390W8u0ICZkSFXyXZtrd52da9gIznc nkMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=wwhdBYXO; 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 o32-v6si3138390pld.768.2018.03.01.06.54.14; Thu, 01 Mar 2018 06:54:30 -0800 (PST) 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=wwhdBYXO; 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 S1031654AbeCAOvg (ORCPT + 99 others); Thu, 1 Mar 2018 09:51:36 -0500 Received: from conssluserg-04.nifty.com ([210.131.2.83]:30692 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031642AbeCAOve (ORCPT ); Thu, 1 Mar 2018 09:51:34 -0500 Received: from mail-vk0-f47.google.com (mail-vk0-f47.google.com [209.85.213.47]) (authenticated) by conssluserg-04.nifty.com with ESMTP id w21EpBne010651; Thu, 1 Mar 2018 23:51:12 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com w21EpBne010651 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1519915872; bh=veBL25uFPGajaGx52PEYXrZ2DCVbNQHZgXzWmoEkqvU=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=wwhdBYXOPXDpLdLvRuWo0nw81NpDKVBRrJMQFmTQACQzbbdCOoIWN6IIps8BJL2Xp 8RCBRHKBvLQ/PYIwWs7cJfgaVcYRaS5cqTdPQ3dPey20acGWnBplg+nQG5hD6yt8Ck OT691WH/KBkBMZRQaKR74OV1kSFe9nLMSLV5IvtJ1+8AQ5dd8xyQ4rVSIHgJ0veA7T De2+qWDMNrv6n3DlQXSzNOl3mBY592D1Y0Jub42ciEdGESfQ/L4zr8rEEbbOl8qT8l O5WlF/s7D2RyC+HaZuCnWjHsbUtnub2IEumhgYPzSZcKfiKtibtRGDbe+rkosXxDmW 0819cNeIS7Evg== X-Nifty-SrcIP: [209.85.213.47] Received: by mail-vk0-f47.google.com with SMTP id b65so3821961vka.2; Thu, 01 Mar 2018 06:51:12 -0800 (PST) X-Gm-Message-State: APf1xPDECCsJEeAZy2nnGjp4W9mBi22bFi8RG9ywnqsAf2gQqpw7A9kr AA8zg6dovN0H57T1rmiXWqYAMsTKLQ3S+oQ+63M= X-Received: by 10.31.55.203 with SMTP id e194mr1352999vka.160.1519915870912; Thu, 01 Mar 2018 06:51:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.32.138 with HTTP; Thu, 1 Mar 2018 06:50:30 -0800 (PST) In-Reply-To: References: <1519776926-30459-1-git-send-email-yamada.masahiro@socionext.com> <1519776926-30459-6-git-send-email-yamada.masahiro@socionext.com> <20180228051525.a2vouqs6djnd2cnf@huvuddator> <20180301111801.gdhoam4kqrbqnasv@huvuddator> From: Masahiro Yamada Date: Thu, 1 Mar 2018 23:50:30 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kconfig: remove redundant streamline_config.pl prerequisite To: Ulf Magnusson Cc: Linux Kbuild mailing list , Marc Herbert , Sam Ravnborg , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-03-01 23:44 GMT+09:00 Masahiro Yamada : > 2018-03-01 23:39 GMT+09:00 Masahiro Yamada : >> 2018-03-01 20:18 GMT+09:00 Ulf Magnusson : >>> The local{yes,mod}config targets currently have streamline_config.pl as >>> a prerequisite. This is redundant, because streamline_config.pl is a >>> checked-in file with no prerequisites. >>> >>> Remove the prerequisite and reference streamline_config.pl directly in >>> the recipe of the rule instead. >>> >>> Signed-off-by: Ulf Magnusson >>> --- >>> scripts/kconfig/Makefile | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile >>> index 1f74336d4e23..58be52cb464d 100644 >> >> >> Thanks! Almost good. >> >> Just small nits. >> >> >>> --- a/scripts/kconfig/Makefile >>> +++ b/scripts/kconfig/Makefile >>> @@ -77,9 +77,9 @@ silentoldconfig: $(obj)/conf >>> touch include/generated/autoksyms.h >>> $< $(silent) --$@ $(Kconfig) >>> >>> -localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf >>> +localyesconfig localmodconfig: $(obj)/conf >>> $(Q)mkdir -p include/config include/generated >>> - $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config >>> + $(Q)perl $(obj)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config >> >> >> >> '$(src)/streamline_config.pl' is better than '$(obj)/streamline_config.pl' >> since it is a checked-in file. >> >> '$(src)' and '$(obj)' are always the same. >> (https://github.com/torvalds/linux/blob/master/scripts/Makefile.build#L6) >> >> >> So, there is no effective difference. >> It is just a coding convention to use $(obj)/ for generated files, >> and $(src)/ for source files. >> >> The original code already used $(obj)/, so this is not your fault >> but I want to fix it while we are here. > > > No. > > This is not a matter of taste, > but a bug that must be fixed. > > > This patch breaks out-of-tree build. > > If O=... is given, it is error. > > > $ make O=foo localyesconfig > make[1]: Leaving directory '/home/masahiro/workspace/linux-yamada/foo' > masahiro@grover:~/workspace/linux-yamada$ make O=foo localyesconfig > make[1]: Entering directory '/home/masahiro/workspace/linux-yamada/foo' > GEN ./Makefile > Can't open perl script "scripts/kconfig/streamline_config.pl": No such > file or directory > ../scripts/kconfig/Makefile:46: recipe for target 'localyesconfig' failed > make[2]: *** [localyesconfig] Error 2 > /home/masahiro/workspace/linux-yamada/Makefile:521: recipe for target > 'localyesconfig' failed > make[1]: *** [localyesconfig] Error 2 > make[1]: Leaving directory '/home/masahiro/workspace/linux-yamada/foo' > Makefile:146: recipe for target 'sub-make' failed > make: *** [sub-make] Error 2 > > > > The right fix is $(srctree)/$(src)/streamline_config.pl > > For somebody wondering why the current code works for out-of-tree building. Kbuild sets VPATH (https://github.com/torvalds/linux/blob/master/Makefile#L208) So, Make searches for pre-requisites in both objtree and srctree when building out-of-tree. VPATH does not work for recipe lines. So, we need to specify the exact path to streamline_config.pl -- Best Regards Masahiro Yamada