提交 61c2018c 编写于 作者: S Shuah Khan

selftests: avoid KBUILD_OUTPUT dir cluttering with selftest objects

Running "make kselftest" or building selftests when KBUILD_OUTPUT
is set, will create selftest objects in the KBUILD_OUTPUT directory.
This could be undesirable especially when user didn't intend to
relocate selftest objects.

Use KBUILD_OUTPUT/kselftest to create selftest objects instead of
cluttering the main directory.
Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
上级 11ebd85a
...@@ -71,6 +71,9 @@ override LDFLAGS = ...@@ -71,6 +71,9 @@ override LDFLAGS =
override MAKEFLAGS = override MAKEFLAGS =
endif endif
# Append kselftest to KBUILD_OUTPUT to avoid cluttering
# KBUILD_OUTPUT with selftest objects and headers installed
# by selftests Makefile or lib.mk.
ifneq ($(KBUILD_SRC),) ifneq ($(KBUILD_SRC),)
override LDFLAGS = override LDFLAGS =
endif endif
...@@ -79,7 +82,7 @@ ifneq ($(O),) ...@@ -79,7 +82,7 @@ ifneq ($(O),)
BUILD := $(O) BUILD := $(O)
else else
ifneq ($(KBUILD_OUTPUT),) ifneq ($(KBUILD_OUTPUT),)
BUILD := $(KBUILD_OUTPUT) BUILD := $(KBUILD_OUTPUT)/kselftest
else else
BUILD := $(shell pwd) BUILD := $(shell pwd)
DEFAULT_INSTALL_HDR_PATH := 1 DEFAULT_INSTALL_HDR_PATH := 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册