summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2010-09-13 17:20:59 +0200
committerMichal Marek <mmarek@suse.cz>2010-09-13 17:20:59 +0200
commit60eab877a9581b479c6c7d7913ce8070a0ace960 (patch)
tree9d2a5e4eca6177999ae61454fa7d78db14ab2d5e /Makefile
parentc3e2f196f9862cd75cb7f495a3cd1f1bbb82bb40 (diff)
parent88d7be031f9f975bb3f50a0b5ef3796a671e7edf (diff)
downloadlinux-stable-60eab877a9581b479c6c7d7913ce8070a0ace960.tar.gz
linux-stable-60eab877a9581b479c6c7d7913ce8070a0ace960.tar.bz2
linux-stable-60eab877a9581b479c6c7d7913ce8070a0ace960.zip
Merge branch 'kbuild/clean' into kbuild/kbuild
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 13 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index f78450e299a2..edfa6cf7cb94 100644
--- a/Makefile
+++ b/Makefile
@@ -1119,21 +1119,13 @@ MRPROPER_FILES += .config .config.old .version .old_version \
#
clean: rm-dirs := $(CLEAN_DIRS)
clean: rm-files := $(CLEAN_FILES)
-clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs) Documentation)
+clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation)
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
#
@@ -1331,16 +1323,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.'
@@ -1357,6 +1340,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 $@