kbuild: use $(srctree) instead of KBUILD_SRC to check out-of-tree build
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 30 Mar 2019 12:04:17 +0000 (21:04 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 2 Apr 2019 14:28:04 +0000 (23:28 +0900)
commita9a49c2ad9b9b8ee20668c15ca2b806dbed8ea40
treebb1ff85715935f583ef536b2a13a5a5ce9433b44
parent48b5ffd1268788afb01525e71e864e901e9aa070
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>
Makefile
scripts/Makefile.build
scripts/Makefile.host
scripts/Makefile.lib
scripts/Makefile.modbuiltin
scripts/gdb/linux/Makefile
scripts/tags.sh