From patchwork Thu Sep 13 10:22:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 146617 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp427796ljw; Thu, 13 Sep 2018 03:23:24 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb+Jno7DXq1UlHpl3kBdkY4nM0+sLR5Mj9wPdh7h9JQjtly2yBT/kBw02dhVGnQYHomIhVI X-Received: by 2002:a63:4663:: with SMTP id v35-v6mr6550196pgk.178.1536834203920; Thu, 13 Sep 2018 03:23:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536834203; cv=none; d=google.com; s=arc-20160816; b=cOhmhhARPmJknu8fKjT0nTsPFJTYEpIJoz6DqXWEDgYE64gj5eMeRYmZFVCSxVdh/d VmvQD5UEvATKRGUE6Xg9hRZt9L2CyVQt5gqQCxaIDuV2Qc0eoMsRWFSwa6phLD02oRJu 93lWmxKxKPptakR3mFSq5VhHfs+VYBiEgtiYPcm4fywDDRMAUM04JtjdP8N/DX1OFtJe smaiyXdwli1Mj5ZI1vTL3tO0jARJGApNYQFi2cARgmEH1YVh0SSeVQygGawbhSZxve7R iw/aidHc4FTQvyUp3ckGwBIN0664EgYan/tLJlt52sRyeLpr6MtgT/e2d9o6l0U+m685 h7FA== 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; bh=QI2N3IFuRCZED84BU1g8XaN0yVydGAH6pDRgc4iDc+8=; b=NVZsOgHGPec6NpsZBJXuAFM9lc6UZ2iZo7Qt7YihBeRnjvaBDEPsKe5JNKJe10apgS g8twqME28zDmNaZWbDPnO4XDT/GYw5pmzYfaReeeXz2109F8QTj5aWNbj4kPrkDcyrfy DfKn0mZJ1DIGn9PJH9b9euBj95CFojOysB0AlDGYekZRsSLTcysNGyypWsx4IjgQqOng SRzqiLNn+dO3NoM2UOoKIr1nG60jqXzOxMQjjtbPB7jLshg/pkn3TNT77kpiUfJRaGYv YwDnvkTJtTtE4v69iKFZ5bsBimfMD2tfwrOIDY8jNOYki48x5yrXuQEdSSWgKkQJxguB 6B6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=j0MC+NzA; 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 x6-v6si3790178pge.100.2018.09.13.03.23.23; Thu, 13 Sep 2018 03:23:23 -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=j0MC+NzA; 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 S1727409AbeIMPcK (ORCPT + 32 others); Thu, 13 Sep 2018 11:32:10 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:27327 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726797AbeIMPcK (ORCPT ); Thu, 13 Sep 2018 11:32:10 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id w8DAMuJx018403; Thu, 13 Sep 2018 19:22:56 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com w8DAMuJx018403 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1536834176; bh=QI2N3IFuRCZED84BU1g8XaN0yVydGAH6pDRgc4iDc+8=; h=From:To:Cc:Subject:Date:From; b=j0MC+NzAgYR4ZL4sG3k5W1HvecFez9B8p+Dj4/OxusKQYbrbRT1K2dvJ3DUMP7Ei2 Q1hVZHnZRPql7RaUl2uXi40edG3Hg5cUrms65LCiKh69aXonU69Gm05igW68LQdDD/ LBttBvkFDuitWxC1w9OrbvzP3ZYa432+oMAu6fQqj80s8NdtXN5gM2+ZKtpNIP4W0n hyj8QrKzHNBB2XXzTtCNKyePS5fYQjRC4227yExjn0DzUl+yaAN9mvgKY6iEzkXfrB QIpkdOPmcjlfsMICt4QDQFt3jab778qGeBEhKfUHbFC3Pth4TX9WShBzop17/HLImy Ky7EMXt4UEIPg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH] kbuild: add --include-dir flag only for out-of-tree build Date: Thu, 13 Sep 2018 19:22:54 +0900 Message-Id: <1536834174-31857-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The --include-dir flag is used to include check-in Makefiles from $(objtree) without prefixing $(srctree)/ the paths. Obviously, this is unnecessary for in-tree build. Add the flag just before changing the working directory. Signed-off-by: Masahiro Yamada --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/Makefile b/Makefile index f8c8e12..8f563a6 100644 --- a/Makefile +++ b/Makefile @@ -15,10 +15,9 @@ NAME = Merciless Moray PHONY := _all _all: -# o Do not use make's built-in rules and variables -# (this increases performance and avoids hard-to-debug behaviour); -# o Look for make include files relative to root of kernel src -MAKEFLAGS += -rR --include-dir=$(CURDIR) +# Do not use make's built-in rules and variables +# (this increases performance and avoids hard-to-debug behaviour); +MAKEFLAGS += -rR # Avoid funny character set dependencies unexport LC_ALL @@ -136,6 +135,9 @@ KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \ $(if $(KBUILD_OUTPUT),, \ $(error failed to create output directory "$(saved-output)")) +# Look for make include files relative to root of kernel src +MAKEFLAGS += --include-dir=$(CURDIR) + PHONY += $(MAKECMDGOALS) sub-make $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make