History

kunit: Always descend into kunit directory during build

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.

Thomas Weißschuh committed 1 year ago

Commit 29128da1 parent 8f5ae302 files · +1 −5Browse files

Showing the changes to lib/kunit (1 of 2 files). Show all

Unified · Split

lib/kunit/Makefile+1−1
@@ -17,7 +17,7 @@ kunit-objs += debugfs.o · 16 unmodified lines
17endif17endif
18 18
19# KUnit 'hooks' are built-in even when KUnit is built as a module.19# KUnit 'hooks' are built-in even when KUnit is built as a module.
20obj-y += hooks.o20obj-$(if $(CONFIG_KUNIT),y) += hooks.o
21 21
22obj-$(CONFIG_KUNIT_TEST) += kunit-test.o22obj-$(CONFIG_KUNIT_TEST) += kunit-test.o
23obj-$(CONFIG_KUNIT_TEST) += platform-test.o23obj-$(CONFIG_KUNIT_TEST) += platform-test.o