From patchwork Wed Jul 4 01:59:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 141001 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp249104ljj; Tue, 3 Jul 2018 19:00:13 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcIoT9gNlEpaQkSXEL4Pbweet0Bw2kOWbHzKpWx4x3tuqalN5e4VMQqMQ2qNQ2ZefyLM9sh X-Received: by 2002:a62:4898:: with SMTP id q24-v6mr129133pfi.58.1530669613648; Tue, 03 Jul 2018 19:00:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530669613; cv=none; d=google.com; s=arc-20160816; b=ZSmYb0uvm1zdXUevoHwiNM8TMjNy6BfsBvp8r+XMTvQiGdbOM0+opd3BzOOgZ4cS2s pt4R70ZVu97xae6fwnNdwuR4nj1O8rUdjY0smhnTHrNTTGM8Jrp8XgtHY1EcUMYBRARg p04Zm63La3DW4gkiDLstI8iye6bTwFG2X9wAjNMROUztkwmkJJm4Nn4G8SUzE4djfYMe YP0Hsuoer+WucLebNwT4+02SwBta79aP/caEKx3h6HqFa4yaiGah0SXpf54OSslKqhZf lHXiHOM2AxOGQakhIWA5vps1IpiED16kFznu3Raa75tkx6ypmZcfcQHpzFwldWcrKDY8 k8CQ== 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:arc-authentication-results; bh=l5/AiLut4uLia1I4UhWGtGWB5OcGdNCfrmEodXqlzMo=; b=tuizLhzzIBxHQgKUrklQrGX0PZLIk7FGuTViDsxJw5hNn1fy7ku4w+vXFyn7yafsLC +WgpzkNW73k4M04muFJ3HUgBMynFmRa+GloYTAKDGuLuutkDnaDgrkZ0sWaqx0341s19 al6mIbgUmc9x8HEr3FJR02WlzHWNQvDwIAa+9LuYW2S6i767l5Jio4V9ntikJTL/OxF7 Q184R2OaIspURDEXwkk/oe9bF1yAiOf4ympDrpPLemIkHWAX8vXDxZuD0qBsuUV0TBhL ER0BVNTo5sALzKhB8uDuuMtVyDyhP+cxW97WOkV7iEwj1SB/gu9tyKj/osNov4TqMMF0 o45w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=Vec2xobH; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 v203-v6si2108967pgb.333.2018.07.03.19.00.13; Tue, 03 Jul 2018 19:00:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=Vec2xobH; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932765AbeGDCAM (ORCPT + 5 others); Tue, 3 Jul 2018 22:00:12 -0400 Received: from conuserg-11.nifty.com ([210.131.2.78]:36259 "EHLO conuserg-11.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932739AbeGDCAM (ORCPT ); Tue, 3 Jul 2018 22:00:12 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id w641xbPX009644; Wed, 4 Jul 2018 10:59:38 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com w641xbPX009644 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1530669578; bh=AtDucubhSssKwNPw/AgiLNAZ2+1pCI1oXdbitIWfW9k=; h=From:To:Cc:Subject:Date:From; b=Vec2xobH7FywVdcpELkBCrgV5qOsMWkm025i3UexX0FmIbMU8v1o+xkqqvv/8JT3A dSefzuxDSdzJEnwK1/MyPe9JkQxTYvzHYNovYO8t3FiOBjIqYQ0DWSdtEVoKbiSKYk IfnZLg+1pe3z4QAv22KowUHDVj2jL8wf37rIbyGBX5L5m1qAk8Fr+iCsw340XZ26UO 6+DLpr0ojDtoA2yB/O7IJEPGxO0y+6d7LNm6s3PXmbT2RMrJmo5lXkDgfKfn18sNZB 0gv8XLZyH9PeTCNRgbEZhkb5gWWk/1dmhEoPFVTXaGd4nuxlgcJ0bLdlSruWGztLcU Cp/d3VtYQtzLg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: devicetree@vger.kernel.org, Rob Herring Cc: Masahiro Yamada , Frank Rowand , linux-kernel@vger.kernel.org Subject: [PATCH] scripts/dtc: consolidate include path options in Makefile Date: Wed, 4 Jul 2018 10:59:23 +0900 Message-Id: <1530669563-32637-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Rob Herring 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 -HOSTCFLAGS_DTC := -I$(src) -I$(src)/libfdt - -HOSTCFLAGS_checks.o := $(HOSTCFLAGS_DTC) -HOSTCFLAGS_data.o := $(HOSTCFLAGS_DTC) -HOSTCFLAGS_dtc.o := $(HOSTCFLAGS_DTC) -HOSTCFLAGS_flattree.o := $(HOSTCFLAGS_DTC) -HOSTCFLAGS_fstree.o := $(HOSTCFLAGS_DTC) -HOSTCFLAGS_livetree.o := $(HOSTCFLAGS_DTC) -HOSTCFLAGS_srcpos.o := $(HOSTCFLAGS_DTC) -HOSTCFLAGS_treesource.o := $(HOSTCFLAGS_DTC) -HOSTCFLAGS_util.o := $(HOSTCFLAGS_DTC) - -HOSTCFLAGS_dtc-lexer.lex.o := $(HOSTCFLAGS_DTC) -HOSTCFLAGS_dtc-parser.tab.o := $(HOSTCFLAGS_DTC) +# Generated files need one more search path to include headers in source tree +HOSTCFLAGS_dtc-lexer.lex.o := -I$(src) +HOSTCFLAGS_dtc-parser.tab.o := -I$(src) # dependencies on generated files need to be listed explicitly $(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h