Skip to contentSkip to conversation

clean Modules.symvers in external module dirs

PATCH In review Mike Frysinger 1 participant 2 messages Jul 31, 2007 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clean Modules.symvers in external module dirs

At the moment, running make clean in an external module directory does a nice job of cleaning up with one exception: it leaves behind Modules.symvers. Attached patch adds this file to the clean list for external modules.

---

Makefile +2 -0
index dfe3d16..1db97d6 100644
@@ -1253,8 +1253,10 @@
 	$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
 
 clean:	rm-dirs := $(MODVERDIR)
+clean: rm-files := Module.symvers
 clean: $(clean-dirs)
 	$(call cmd,rmdirs)
+	$(call cmd,rmfiles)
 	@find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \
 		\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
 		-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \
#1 lore raw

At the moment, running make clean in an external module directory does a nice job of cleaning up with one exception: it leaves behind Modules.symvers. Attached patch adds this file to the clean list for external modules.

---
err it'd help if i actually prefixed the external directory

Makefile +2 -0
index dfe3d16..1db97d6 100644
@@ -1253,8 +1253,10 @@ $(clean-dirs):
 	$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
 
 clean:	rm-dirs := $(MODVERDIR)
+clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers
 clean: $(clean-dirs)
 	$(call cmd,rmdirs)
+	$(call cmd,rmfiles)
 	@find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \
 		\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
 		-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \