aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2010-09-06 06:00:08 -0400
committerMichal Marek <mmarek@suse.cz>2010-09-06 06:00:08 -0400
commit88d7be031f9f975bb3f50a0b5ef3796a671e7edf (patch)
treed9bda19b9cb14b18fcebb38307b158eaeb27d27b /Makefile
parentc47f214ac65a45597917e017b7a1c617a56ac1cb (diff)
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>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile31
1 files changed, 12 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index d71bfdee7fb..414a6469728 100644
--- a/Makefile
+++ b/Makefile
@@ -1186,15 +1186,7 @@ PHONY += $(clean-dirs) clean archclean
1186$(clean-dirs): 1186$(clean-dirs):
1187 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) 1187 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
1188 1188
1189clean: archclean $(clean-dirs) 1189clean: archclean
1190 $(call cmd,rmdirs)
1191 $(call cmd,rmfiles)
1192 @find . $(RCS_FIND_IGNORE) \
1193 \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
1194 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
1195 -o -name '*.symtypes' -o -name 'modules.order' \
1196 -o -name modules.builtin -o -name '.tmp_*.o.*' \
1197 -o -name '*.gcno' \) -type f -print | xargs rm -f
1198 1190
1199# mrproper - Delete all generated files, including .config 1191# mrproper - Delete all generated files, including .config
1200# 1192#
@@ -1392,16 +1384,7 @@ $(clean-dirs):
1392 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) 1384 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
1393 1385
1394clean: rm-dirs := $(MODVERDIR) 1386clean: rm-dirs := $(MODVERDIR)
1395clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers \ 1387clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers
1396 $(KBUILD_EXTMOD)/modules.order \
1397 $(KBUILD_EXTMOD)/modules.builtin
1398clean: $(clean-dirs)
1399 $(call cmd,rmdirs)
1400 $(call cmd,rmfiles)
1401 @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \
1402 \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
1403 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
1404 -o -name '*.gcno' \) -type f -print | xargs rm -f
1405 1388
1406help: 1389help:
1407 @echo ' Building external modules.' 1390 @echo ' Building external modules.'
@@ -1418,6 +1401,16 @@ prepare: ;
1418scripts: ; 1401scripts: ;
1419endif # KBUILD_EXTMOD 1402endif # KBUILD_EXTMOD
1420 1403
1404clean: $(clean-dirs)
1405 $(call cmd,rmdirs)
1406 $(call cmd,rmfiles)
1407 @find $(or $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
1408 \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
1409 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
1410 -o -name '*.symtypes' -o -name 'modules.order' \
1411 -o -name modules.builtin -o -name '.tmp_*.o.*' \
1412 -o -name '*.gcno' \) -type f -print | xargs rm -f
1413
1421# Generate tags for editors 1414# Generate tags for editors
1422# --------------------------------------------------------------------------- 1415# ---------------------------------------------------------------------------
1423quiet_cmd_tags = GEN $@ 1416quiet_cmd_tags = GEN $@