summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/Makefile
diff options
context:
space:
mode:
authorShuah Khan <skhan@linuxfoundation.org>2020-02-26 15:54:49 -0700
committerShuah Khan <skhan@linuxfoundation.org>2020-03-13 13:46:12 -0600
commit29e911ef7b706215caf02a82b0d3076611d6abe8 (patch)
tree7ef624842a1cb2183b4b371a378bc97d9d4807eb /tools/testing/selftests/Makefile
parent1ae81d78a8b2f6314fb90dc4296202611e710b37 (diff)
selftests: Fix kselftest O=objdir build from cluttering top level objdir
make kselftest-all O=objdir builds create generated objects in objdir. This clutters the top level directory with kselftest objects. Fix it to create sub-directory under objdir for kselftest objects. Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/Makefile')
-rw-r--r--tools/testing/selftests/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 63430e2664c2..be22dbe94a4c 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -85,7 +85,7 @@ override LDFLAGS =
override MAKEFLAGS =
endif
-# Append kselftest to KBUILD_OUTPUT to avoid cluttering
+# Append kselftest to KBUILD_OUTPUT and O to avoid cluttering
# KBUILD_OUTPUT with selftest objects and headers installed
# by selftests Makefile or lib.mk.
ifdef building_out_of_srctree
@@ -93,7 +93,7 @@ override LDFLAGS =
endif
ifneq ($(O),)
- BUILD := $(O)
+ BUILD := $(O)/kselftest
else
ifneq ($(KBUILD_OUTPUT),)
BUILD := $(KBUILD_OUTPUT)/kselftest