]> git.baikalelectronics.ru Git - kernel.git/commitdiff
selftests: Fix kselftest O=objdir build from cluttering top level objdir
authorShuah Khan <skhan@linuxfoundation.org>
Wed, 26 Feb 2020 22:54:49 +0000 (15:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:42:00 +0000 (11:42 +0100)
commit ac8104b5c937e87c10017dbee0edbebec9497020 upstream.

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>
Signed-off-by: Tyler Hicks (Microsoft) <code@tyhicks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/Makefile

index 612f6757015d5ea233a056c3b6e15de505ad4264..0eb5567bb94a0a0eff6294da543ab53f77615d78 100644 (file)
@@ -78,7 +78,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
@@ -86,7 +86,7 @@ override LDFLAGS =
 endif
 
 ifneq ($(O),)
-       BUILD := $(O)
+       BUILD := $(O)/kselftest
 else
        ifneq ($(KBUILD_OUTPUT),)
                BUILD := $(KBUILD_OUTPUT)/kselftest