diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-03-30 13:04:17 +0100 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-04-02 16:28:04 +0200 |
commit | a9a49c2ad9b9b8ee20668c15ca2b806dbed8ea40 (patch) | |
tree | bb1ff85715935f583ef536b2a13a5a5ce9433b44 /scripts/Makefile.modbuiltin | |
parent | kbuild: mkmakefile: generate a simple wrapper of top Makefile (diff) | |
download | linux-a9a49c2ad9b9b8ee20668c15ca2b806dbed8ea40.tar.xz linux-a9a49c2ad9b9b8ee20668c15ca2b806dbed8ea40.zip |
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.modbuiltin')
-rw-r--r-- | scripts/Makefile.modbuiltin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/Makefile.modbuiltin b/scripts/Makefile.modbuiltin index a072a4267746..ea90a90b41a0 100644 --- a/scripts/Makefile.modbuiltin +++ b/scripts/Makefile.modbuiltin @@ -15,7 +15,7 @@ include include/config/tristate.conf include scripts/Kbuild.include -ifneq ($(KBUILD_SRC),) +ifneq ($(srctree),.) # Create output directory if not already present _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) endif |