mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 13:30:45 -05:00
For kbuild to properly clean up these build artifacts in the subdirectory, even after CONFIG_KUNIT changed do disabled, the directory needs to be processed always. Pushing the special logic for hook.o into the kunit Makefile also makes the logic easier to understand. Link: https://lore.kernel.org/r/20250813-kunit-always-descend-v1-1-7bbd387ff13b@linutronix.de Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Reviewed-by: David Gow <davidgow@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
32 lines
743 B
Makefile
32 lines
743 B
Makefile
obj-$(CONFIG_KUNIT) += kunit.o
|
|
|
|
kunit-objs += test.o \
|
|
resource.o \
|
|
user_alloc.o \
|
|
static_stub.o \
|
|
string-stream.o \
|
|
assert.o \
|
|
try-catch.o \
|
|
executor.o \
|
|
attributes.o \
|
|
device.o \
|
|
platform.o
|
|
|
|
ifeq ($(CONFIG_KUNIT_DEBUGFS),y)
|
|
kunit-objs += debugfs.o
|
|
endif
|
|
|
|
# KUnit 'hooks' are built-in even when KUnit is built as a module.
|
|
obj-$(if $(CONFIG_KUNIT),y) += hooks.o
|
|
|
|
obj-$(CONFIG_KUNIT_TEST) += kunit-test.o
|
|
obj-$(CONFIG_KUNIT_TEST) += platform-test.o
|
|
|
|
# string-stream-test compiles built-in only.
|
|
ifeq ($(CONFIG_KUNIT_TEST),y)
|
|
obj-$(CONFIG_KUNIT_TEST) += string-stream-test.o
|
|
obj-$(CONFIG_KUNIT_TEST) += assert_test.o
|
|
endif
|
|
|
|
obj-$(CONFIG_KUNIT_EXAMPLE_TEST) += kunit-example-test.o
|