diff options
author | Michal Marek <mmarek@suse.cz> | 2010-09-06 12:00:08 +0200 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-09-06 12:00:08 +0200 |
commit | 88d7be031f9f975bb3f50a0b5ef3796a671e7edf (patch) | |
tree | d9bda19b9cb14b18fcebb38307b158eaeb27d27b | |
parent | kbuild: Do not run make clean in $(srctree) (diff) | |
download | linux-88d7be031f9f975bb3f50a0b5ef3796a671e7edf.tar.xz linux-88d7be031f9f975bb3f50a0b5ef3796a671e7edf.zip |
kbuild: Use a single clean rule for kernel and external modules
The list of patterns for the external modules case was constantly
lagging behind.
Signed-off-by: Michal Marek <mmarek@suse.cz>
-rw-r--r-- | Makefile | 31 |
1 files changed, 12 insertions, 19 deletions
@@ -1186,15 +1186,7 @@ PHONY += $(clean-dirs) clean archclean $(clean-dirs): $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) -clean: archclean $(clean-dirs) - $(call cmd,rmdirs) - $(call cmd,rmfiles) - @find . $(RCS_FIND_IGNORE) \ - \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ - -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ - -o -name '*.symtypes' -o -name 'modules.order' \ - -o -name modules.builtin -o -name '.tmp_*.o.*' \ - -o -name '*.gcno' \) -type f -print | xargs rm -f +clean: archclean # mrproper - Delete all generated files, including .config # @@ -1392,16 +1384,7 @@ $(clean-dirs): $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) clean: rm-dirs := $(MODVERDIR) -clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers \ - $(KBUILD_EXTMOD)/modules.order \ - $(KBUILD_EXTMOD)/modules.builtin -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' \ - -o -name '*.gcno' \) -type f -print | xargs rm -f +clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers help: @echo ' Building external modules.' @@ -1418,6 +1401,16 @@ prepare: ; scripts: ; endif # KBUILD_EXTMOD +clean: $(clean-dirs) + $(call cmd,rmdirs) + $(call cmd,rmfiles) + @find $(or $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \ + \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ + -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ + -o -name '*.symtypes' -o -name 'modules.order' \ + -o -name modules.builtin -o -name '.tmp_*.o.*' \ + -o -name '*.gcno' \) -type f -print | xargs rm -f + # Generate tags for editors # --------------------------------------------------------------------------- quiet_cmd_tags = GEN $@ |