diff options
author | Masahiro Yamada | 2019-07-06 12:07:12 +0900 |
---|---|---|
committer | Masahiro Yamada | 2019-07-11 00:05:09 +0900 |
commit | 051f278e9d81bed253bf89c66c80b8b921aafa8a (patch) | |
tree | 188b90e6cd434ca30972e6166bfbc88e273d9474 /tools/testing/selftests/lib.mk | |
parent | 75dd47472b92c320304436c9e38638bc04ae7a4a (diff) |
kbuild: replace KBUILD_SRCTREE with boolean building_out_of_srctree
Commit 25b146c5b8ce ("kbuild: allow Kbuild to start from any directory")
deprecated KBUILD_SRCTREE.
It is only used in tools/testing/selftest/ to distinguish out-of-tree
build. Replace it with a new boolean flag, building_out_of_srctree.
I also replaced the conditional ($(srctree),.) because the next commit
will allow an absolute path to be used for $(srctree) even when building
in the source tree.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'tools/testing/selftests/lib.mk')
-rw-r--r-- | tools/testing/selftests/lib.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk index 077337195783..1c8a1963d03f 100644 --- a/tools/testing/selftests/lib.mk +++ b/tools/testing/selftests/lib.mk @@ -70,7 +70,7 @@ define RUN_TESTS endef run_tests: all -ifneq ($(KBUILD_SRC),) +ifdef building_out_of_srctree @if [ "X$(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)" != "X" ]; then @rsync -aq $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) $(OUTPUT) fi @@ -125,7 +125,7 @@ clean: # When make O= with kselftest target from main level # the following aren't defined. # -ifneq ($(KBUILD_SRC),) +ifdef building_out_of_srctree LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) COMPILE.S = $(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c LINK.S = $(CC) $(ASFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) |