From: Mike Frysinger 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. Signed-off-by: Mike Frysinger Cc: Sam Ravnborg Signed-off-by: Andrew Morton --- Makefile | 2 ++ 1 files changed, 2 insertions(+) diff -puN Makefile~clean-modulessymvers-in-external-module-dirs Makefile --- a/Makefile~clean-modulessymvers-in-external-module-dirs +++ a/Makefile @@ -1254,8 +1254,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' \) \ _