kbuild: clean Modules.symvers in external module dirs
authorMike Frysinger <vapier@gentoo.org>
Tue, 31 Jul 2007 23:45:34 +0000 (19:45 -0400)
committerSam Ravnborg <sam@neptun.(none)>
Fri, 12 Oct 2007 19:15:30 +0000 (21:15 +0200)
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 <vapier@gentoo.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Makefile

index 1274084..2738966 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1255,8 +1255,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' \) \