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 8da668512f5d..519db43052a0 100644
--- a/Makefile
+++ b/Makefile
@@ -1140,21 +1140,13 @@ MRPROPER_FILES += .config .config.old .version .old_version \
1140# 1140#
1141clean: rm-dirs := $(CLEAN_DIRS) 1141clean: rm-dirs := $(CLEAN_DIRS)
1142clean: rm-files := $(CLEAN_FILES) 1142clean: rm-files := $(CLEAN_FILES)
1143clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs) Documentation) 1143clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation)
1144 1144
1145PHONY += $(clean-dirs) clean archclean 1145PHONY += $(clean-dirs) clean archclean
1146$(clean-dirs): 1146$(clean-dirs):
1147 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) 1147 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
1148 1148
1149clean: archclean $(clean-dirs) 1149clean: archclean
1150 $(call cmd,rmdirs)
1151 $(call cmd,rmfiles)
1152 @find . $(RCS_FIND_IGNORE) \
1153 \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
1154 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
1155 -o -name '*.symtypes' -o -name 'modules.order' \
1156 -o -name modules.builtin -o -name '.tmp_*.o.*' \
1157 -o -name '*.gcno' \) -type f -print | xargs rm -f
1158 1150
1159# mrproper - Delete all generated files, including .config 1151# mrproper - Delete all generated files, including .config
1160# 1152#
@@ -1355,16 +1347,7 @@ $(clean-dirs):
1355 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) 1347 $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
1356 1348
1357clean: rm-dirs := $(MODVERDIR) 1349clean: rm-dirs := $(MODVERDIR)
1358clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers \ 1350clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers
1359 $(KBUILD_EXTMOD)/modules.order \
1360 $(KBUILD_EXTMOD)/modules.builtin
1361clean: $(clean-dirs)
1362 $(call cmd,rmdirs)
1363 $(call cmd,rmfiles)
1364 @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \
1365 \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
1366 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
1367 -o -name '*.gcno' \) -type f -print | xargs rm -f
1368 1351
1369help: 1352help:
1370 @echo ' Building external modules.' 1353 @echo ' Building external modules.'
@@ -1381,6 +1364,16 @@ prepare: ;
1381scripts: ; 1364scripts: ;
1382endif # KBUILD_EXTMOD 1365endif # KBUILD_EXTMOD
1383 1366
1367clean: $(clean-dirs)
1368 $(call cmd,rmdirs)
1369 $(call cmd,rmfiles)
1370 @find $(or $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
1371 \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
1372 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
1373 -o -name '*.symtypes' -o -name 'modules.order' \
1374 -o -name modules.builtin -o -name '.tmp_*.o.*' \
1375 -o -name '*.gcno' \) -type f -print | xargs rm -f
1376
1384# Generate tags for editors 1377# Generate tags for editors
1385# --------------------------------------------------------------------------- 1378# ---------------------------------------------------------------------------
1386quiet_cmd_tags = GEN $@ 1379quiet_cmd_tags = GEN $@