kunit: Always descend into kunit directory during build
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Wed, 13 Aug 2025 06:28:30 +0000 (08:28 +0200)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 15 Aug 2025 17:39:46 +0000 (11:39 -0600)
commit29128da29dbabfe567c0133bf069052d2d5d588c
tree8ff71c52c78f4a1c27713f20916e4e208c7b4fb7
parent8f5ae30d69d7543eee0d70083daf4de8fe15d585
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.

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>
lib/Makefile
lib/kunit/Makefile