Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4564073imm; Mon, 20 Aug 2018 19:10:59 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwkMGQu52i6YlOqdTnuq/+BqNweMxAWXkjF8wllcTEEJrecHNEugwPOmK9aL6dtv9N/4A0p X-Received: by 2002:a63:710d:: with SMTP id m13-v6mr45116705pgc.66.1534817459729; Mon, 20 Aug 2018 19:10:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534817459; cv=none; d=google.com; s=arc-20160816; b=UUneiWSx7CdAVscNW+taRnmwcbx1FCrZiADbeGc/30ICRXcsKTE30DBZHxGRFcu/IL jeptojgoP+WQ7q9m8WWC86gUnFUZiUpzUVjNxDq4mEFq8cw2xodz209kOqPZ7PODMdIf 2NFRjYpnLYm225cKeFnCySA3Z2RUnut8j8/XFjdxxLiZSIb60321dGdlKv9HO6pVTRUl 0jYIgJcT+MKjghsKlp8PE7M0unFz0Xb463f4uamcl9cPo/25w09x+JWouoDvJCDxZhjY asM+bJS2KGuKaDg0sVM9aEueDrPneA0M30TaE9jgNjPpf0kL+0wi1Mg/v4cqwL3qFYFu 6okA== 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=gsF6h0X+fg4RCfQ2zdNsacviknEfaWWbIUWk+nFPRVQ=; b=ryVD9DQ1Nf083BA/fHOVNMVK8AXDlwpQrhcy088djAJK4+pswrRHT70nQE30qaD8++ QJrD7EF+a/ycXDOsAMCFtOYWqBGAAvoZZb8lfGtacbKBjUn1wlimM3vTxDOPcHVeHleI VZfnj0DMpwDkRnOxIB9F6/KPUZybvhIkAmng07kteDsWT+SVjK6IPMTYZJyM4KXeSMOj l0QbxX9jAFOIWF/omL6pZQ8toaUi6Zt/mwO0xzcocLJneUGy9X1/4ZgeGs4T2JQf20uW iIjsSkF4voVSWppUKhCxxOcsFP3buxyr+D39R1foqJbxW9AVVqLmCxZphqIyXOCBf51Q +KFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Hky3ozmX; 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 p20-v6si9644356pgk.393.2018.08.20.19.10.44; Mon, 20 Aug 2018 19:10: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=Hky3ozmX; 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 S1726609AbeHUF1S (ORCPT + 99 others); Tue, 21 Aug 2018 01:27:18 -0400 Received: from conssluserg-04.nifty.com ([210.131.2.83]:45049 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725731AbeHUF1S (ORCPT ); Tue, 21 Aug 2018 01:27:18 -0400 Received: from mail-vk0-f48.google.com (mail-vk0-f48.google.com [209.85.213.48]) (authenticated) by conssluserg-04.nifty.com with ESMTP id w7L294AB003810; Tue, 21 Aug 2018 11:09:05 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com w7L294AB003810 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1534817345; bh=gsF6h0X+fg4RCfQ2zdNsacviknEfaWWbIUWk+nFPRVQ=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=Hky3ozmXhtnatcyDbu0oe28bqpyhENBo3NiumMSSXPmsFdrRAHLLV9L6oDqKZjRhz raESu3xEz8VklL2epB0UlPJ27py6ZKtJV766Jqp3SFDDCMBdZzDkp7ExWKy1z5me0s j0wDdZRwh4tfsSBGel4Lrxq000bJWO8J0yRN2bD4U3aclDqV4+AGstXZdAS0zhXy9E BqxBVrckH5E/SPOkbiKaoxBoHdjec2yXMtM4W/eWWD9G8FOC5a+mNEOeSE2WFQyuzw yuobUyHyLo6YMNoAvkKYovIcfailI/xzPv+isU4uUBBYDqF4VdPrfctilIQnobyo+9 sS7L7OyG3wtxw== X-Nifty-SrcIP: [209.85.213.48] Received: by mail-vk0-f48.google.com with SMTP id 125-v6so7500516vke.11; Mon, 20 Aug 2018 19:09:04 -0700 (PDT) X-Gm-Message-State: AOUpUlHkm/bQeYug+8lgby7HRxFBrhiZF7jPSGz4493HlcdvdFxnxoC0 hAF++D305RelZE5sy2JMOi2xRjW5QqC6JpAWuM4= X-Received: by 2002:a1f:2cce:: with SMTP id s197-v6mr29792116vks.106.1534817343775; Mon, 20 Aug 2018 19:09:03 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:2642:0:0:0:0:0 with HTTP; Mon, 20 Aug 2018 19:08:23 -0700 (PDT) In-Reply-To: <7fba348e-9fd3-9661-248d-82917f8f6676@gmail.com> References: <1530669563-32637-1-git-send-email-yamada.masahiro@socionext.com> <7fba348e-9fd3-9661-248d-82917f8f6676@gmail.com> From: Masahiro Yamada Date: Tue, 21 Aug 2018 11:08:23 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] scripts/dtc: consolidate include path options in Makefile To: Frank Rowand Cc: Rob Herring , DTML , "linux-kernel@vger.kernel.org" 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 Hi Frank, 2018-08-21 10:31 GMT+09:00 Frank Rowand : > On 08/20/18 14:32, Rob Herring wrote: >> On Mon, Aug 20, 2018 at 1:55 PM Frank Rowand wrote: >>> >>> On 07/03/18 18:59, Masahiro Yamada wrote: >>>> It is tedious to specify extra compiler options for every file. >>>> HOST_EXTRACFLAGS is useful to add options to all files in a >>>> directory. >>>> >>>> -I$(src)/libfdt is needed for all the files in this directory >>>> to include libfdt_env.h etc. from scripts/dtc/libfdt/. >>>> >>>> On the other hand, -I$(src) is used to include check-in headers >>>> from generated C files. Thus, I added it only to dtc-lexer.lex.o >>>> and dtc-parser.tab.o . >>>> >>>> Signed-off-by: Masahiro Yamada >>>> --- >>>> >>>> scripts/dtc/Makefile | 18 ++++-------------- >>>> 1 file changed, 4 insertions(+), 14 deletions(-) >>>> >>>> diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile >>>> index 9cac65b..1c943e0 100644 >>>> --- a/scripts/dtc/Makefile >>>> +++ b/scripts/dtc/Makefile >>>> @@ -9,21 +9,11 @@ dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \ >>>> dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o >>>> >>>> # Source files need to get at the userspace version of libfdt_env.h to compile >>>> +HOST_EXTRACFLAGS := -I$(src)/libfdt >>> >>> Shouldn't that be += instead of :=? >> >> I don't think so. The definition is local to the file (and reset >> before each makefile is included). >> >> Rob >> > > Every other place where HOST_EXTRACFLAGS is assigned a value, += is used > instead of :=, including the example in Documentation/kbuild/makefiles.txt > > What makes scripts/dtc/Makefile different than the other makefiles? > > -Frank > := and += work in the same way in here. As Rob said, HOST_EXTRACFLAGS is reset in each makefile because HOST_EXTRACFLAGS is not export'ed. (scripts/gcc-plugins/Makefile actually export's it, but it is wrong.) Precisely speaking, HOST_EXTRACFLAGS is immediately expanded if it is set by :=, whereas it is lazily expanded if it is set by +=. But, there is no effective difference in this case. -- Best Regards Masahiro Yamada