aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 13 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index 3e438055a92c..6b23f1b15fc4 100644
--- a/Makefile
+++ b/Makefile
@@ -1137,21 +1137,13 @@ MRPROPER_FILES += .config .config.old .version .old_version \
1137# 1137#
1138clean: rm-dirs := $(CLEAN_DIRS) 1138clean: rm-dirs := $(CLEAN_DIRS)
1139clean: rm-files := $(CLEAN_FILES) 1139clean: rm-files := $(CLEAN_FILES)
1140clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs) Documentation) 1140clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation)
1141 1141
1142PHONY += $(clean-dirs) clean archclean 1142PHONY += $(clean-dirs) clean archclean
1143$(clean-dirs): 1143$(clean-dirs):
1144 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) 1144 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
1145 1145
1146clean: archclean $(clean-dirs) 1146clean: archclean
1147 $(call cmd,rmdirs)
1148 $(call cmd,rmfiles)
1149 @find . $(RCS_FIND_IGNORE) \
1150 \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
1151 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
1152 -o -name '*.symtypes' -o -name 'modules.order' \
1153 -o -name modules.builtin -o -name '.tmp_*.o.*' \
1154 -o -name '*.gcno' \) -type f -print | xargs rm -f
1155 1147
1156# mrproper - Delete all generated files, including .config 1148# mrproper - Delete all generated files, including .config
1157# 1149#
@@ -1352,16 +1344,7 @@ $(clean-dirs):
1352 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) 1344 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
1353 1345
1354clean: rm-dirs := $(MODVERDIR) 1346clean: rm-dirs := $(MODVERDIR)
1355clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers \ 1347clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers
1356 $(KBUILD_EXTMOD)/modules.order \
1357 $(KBUILD_EXTMOD)/modules.builtin
1358clean: $(clean-dirs)
1359 $(call cmd,rmdirs)
1360 $(call cmd,rmfiles)
1361 @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \
1362 \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
1363 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
1364 -o -name '*.gcno' \) -type f -print | xargs rm -f
1365 1348
1366help: 1349help:
1367 @echo ' Building external modules.' 1350 @echo ' Building external modules.'
@@ -1378,6 +1361,16 @@ prepare: ;
1378scripts: ; 1361scripts: ;
1379endif # KBUILD_EXTMOD 1362endif # KBUILD_EXTMOD
1380 1363
1364clean: $(clean-dirs)
1365 $(call cmd,rmdirs)
1366 $(call cmd,rmfiles)
1367 @find $(or $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
1368 \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
1369 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
1370 -o -name '*.symtypes' -o -name 'modules.order' \
1371 -o -name modules.builtin -o -name '.tmp_*.o.*' \
1372 -o -name '*.gcno' \) -type f -print | xargs rm -f
1373
1381# Generate tags for editors 1374# Generate tags for editors
1382# --------------------------------------------------------------------------- 1375# ---------------------------------------------------------------------------
1383quiet_cmd_tags = GEN $@ 1376quiet_cmd_tags = GEN $@