[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1536834174-31857-1-git-send-email-yamada.masahiro@socionext.com>
Date: Thu, 13 Sep 2018 19:22:54 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: linux-kbuild@...r.kernel.org
Cc: Masahiro Yamada <yamada.masahiro@...ionext.com>,
Michal Marek <michal.lkml@...kovi.net>,
linux-kernel@...r.kernel.org
Subject: [PATCH] kbuild: add --include-dir flag only for out-of-tree build
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 <yamada.masahiro@...ionext.com>
---
Makefile | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
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
--
2.7.4
Powered by blists - more mailing lists