Skip to contentSkip to conversation

selftests/Makefile: include $(INSTALL_DEP_TARGETS) in clean target to clean net/lib dependency

PATCH Applied Nai-Chen Cheng 5 participants 5 messages Sep 10, 2025 – Sep 16, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests/Makefile: include $(INSTALL_DEP_TARGETS) in clean target to clean net/lib dependency

The selftests 'make clean' does not clean the net/lib because it only processes $(TARGETS) and ignores $(INSTALL_DEP_TARGETS). This leaves compiled objects in net/lib after cleaning, requiring manual cleanup.

Include $(INSTALL_DEP_TARGETS) in clean target to ensure net/lib dependency is properly cleaned.

---
 tools/testing/selftests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/Makefile +1 -1
index 030da61dbff3a7e4a22d61ba3972e248a43d374d..a2d8e1093b005c9af3570246dd8b10b59e44b46b 100644
@@ -314,7 +314,7 @@ gen_tar: install
 	@echo "Created ${TAR_PATH}"
 
 clean:
-	@for TARGET in $(TARGETS); do \
+	@for TARGET in $(TARGETS) $(INSTALL_DEP_TARGETS); do \
 		BUILD_TARGET=$$BUILD/$$TARGET;	\
 		$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET clean;\
 	done;

---
base-commit: 9dd1835ecda5b96ac88c166f4a87386f3e727bd9
change-id: 20250910-selftests-makefile-clean-cc2fb70e9e32

Best regards,

Signature · 1 line
Nai-Chen Cheng <[email protected]>
reviewer Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 8 lines · Nai-Chen Cheng

The selftests 'make clean' does not clean the net/lib because it only processes $(TARGETS) and ignores $(INSTALL_DEP_TARGETS). This leaves compiled objects in net/lib after cleaning, requiring manual cleanup.

Include $(INSTALL_DEP_TARGETS) in clean target to ensure net/lib dependency is properly cleaned.

maintainer
#2 lore raw
In reply to Nai-Chen Cheng
Quoted 6 lines · On Wed, 10 Sep 2025 19:30:32 +0800 Nai-Chen Cheng wrote:

The selftests 'make clean' does not clean the net/lib because it only processes $(TARGETS) and ignores $(INSTALL_DEP_TARGETS). This leaves compiled objects in net/lib after cleaning, requiring manual cleanup.

Include $(INSTALL_DEP_TARGETS) in clean target to ensure net/lib dependency is properly cleaned.

Shuah, please LMK if think it makes sense for netdev to take this (net/lib is the only DEP_TARGET today).

maintainer Acked-by
#3 lore raw
Quoted 10 lines · Jakub Kicinski
Quoted 6 lines · On Wed, 10 Sep 2025 19:30:32 +0800 Nai-Chen Cheng wrote:

The selftests 'make clean' does not clean the net/lib because it only processes $(TARGETS) and ignores $(INSTALL_DEP_TARGETS). This leaves compiled objects in net/lib after cleaning, requiring manual cleanup.

Include $(INSTALL_DEP_TARGETS) in clean target to ensure net/lib dependency is properly cleaned.

Shuah, please LMK if think it makes sense for netdev to take this (net/lib is the only DEP_TARGET today).

No problems - take this through netdev

thanks,
-- Shuah

#4 lore raw
In reply to Nai-Chen Cheng
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Wed, 10 Sep 2025 19:30:32 +0800 you wrote:

The selftests 'make clean' does not clean the net/lib because it only processes $(TARGETS) and ignores $(INSTALL_DEP_TARGETS). This leaves compiled objects in net/lib after cleaning, requiring manual cleanup.

Include $(INSTALL_DEP_TARGETS) in clean target to ensure net/lib dependency is properly cleaned.

[...]

Here is the summary with links:
- selftests/Makefile: include $(INSTALL_DEP_TARGETS) in clean target to clean net/lib dependency

    https://git.kernel.org/netdev/net-next/c/d3f7457da7b9

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html