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
1717 endif
1818
1919 # KUnit 'hooks' are built-in even when KUnit is built as a module.
20−obj-y += hooks.o
20+obj-$(if $(CONFIG_KUNIT),y) += hooks.o
2121
2222 obj-$(CONFIG_KUNIT_TEST) += kunit-test.o
2323 obj-$(CONFIG_KUNIT_TEST) += platform-test.o

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t