selftests: Fix kselftest O=objdir build from cluttering top level objdir
commit 29e911ef7b706215caf02a82b0d3076611d6abe8 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>
This commit is contained in:
parent
320dbbd86f
commit
cad6d2bb47
@ -78,7 +78,7 @@ override LDFLAGS =
|
|||||||
override MAKEFLAGS =
|
override MAKEFLAGS =
|
||||||
endif
|
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
|
# KBUILD_OUTPUT with selftest objects and headers installed
|
||||||
# by selftests Makefile or lib.mk.
|
# by selftests Makefile or lib.mk.
|
||||||
ifdef building_out_of_srctree
|
ifdef building_out_of_srctree
|
||||||
@ -86,7 +86,7 @@ override LDFLAGS =
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(O),)
|
ifneq ($(O),)
|
||||||
BUILD := $(O)
|
BUILD := $(O)/kselftest
|
||||||
else
|
else
|
||||||
ifneq ($(KBUILD_OUTPUT),)
|
ifneq ($(KBUILD_OUTPUT),)
|
||||||
BUILD := $(KBUILD_OUTPUT)/kselftest
|
BUILD := $(KBUILD_OUTPUT)/kselftest
|
||||||
|
Loading…
Reference in New Issue
Block a user