aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.build
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-03-30 08:04:17 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-04-02 10:28:04 -0400
commita9a49c2ad9b9b8ee20668c15ca2b806dbed8ea40 (patch)
treebb1ff85715935f583ef536b2a13a5a5ce9433b44 /scripts/Makefile.build
parent48b5ffd1268788afb01525e71e864e901e9aa070 (diff)
kbuild: use $(srctree) instead of KBUILD_SRC to check out-of-tree build
KBUILD_SRC was conventionally used for some different purposes: [1] To remember the source tree path [2] As a flag to check if sub-make is already done [3] As a flag to check if Kbuild runs out of tree For [1], we do not need to remember it because the top Makefile can compute it by $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) [2] has been replaced with self-commenting 'sub_make_done'. For [3], we can distinguish in-tree/out-of-tree by comparing $(srctree) and '.' This commit converts [3] to prepare for the KBUILD_SRC removal. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/Makefile.build')
-rw-r--r--scripts/Makefile.build2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 76ca30cc4791..9dddfb6f554e 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -501,7 +501,7 @@ existing-targets := $(wildcard $(sort $(targets)))
501 501
502-include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd) 502-include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd)
503 503
504ifneq ($(KBUILD_SRC),) 504ifneq ($(srctree),.)
505# Create directories for object files if they do not exist 505# Create directories for object files if they do not exist
506obj-dirs := $(sort $(obj) $(patsubst %/,%, $(dir $(targets)))) 506obj-dirs := $(sort $(obj) $(patsubst %/,%, $(dir $(targets))))
507# If targets exist, their directories apparently exist. Skip mkdir. 507# If targets exist, their directories apparently exist. Skip mkdir.