diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 33 |
1 files changed, 13 insertions, 20 deletions
@@ -1140,21 +1140,13 @@ MRPROPER_FILES += .config .config.old .version .old_version \ | |||
1140 | # | 1140 | # |
1141 | clean: rm-dirs := $(CLEAN_DIRS) | 1141 | clean: rm-dirs := $(CLEAN_DIRS) |
1142 | clean: rm-files := $(CLEAN_FILES) | 1142 | clean: rm-files := $(CLEAN_FILES) |
1143 | clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs) Documentation) | 1143 | clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation) |
1144 | 1144 | ||
1145 | PHONY += $(clean-dirs) clean archclean | 1145 | PHONY += $(clean-dirs) clean archclean |
1146 | $(clean-dirs): | 1146 | $(clean-dirs): |
1147 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) | 1147 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) |
1148 | 1148 | ||
1149 | clean: archclean $(clean-dirs) | 1149 | clean: 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 | ||
1357 | clean: rm-dirs := $(MODVERDIR) | 1349 | clean: rm-dirs := $(MODVERDIR) |
1358 | clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers \ | 1350 | clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers |
1359 | $(KBUILD_EXTMOD)/modules.order \ | ||
1360 | $(KBUILD_EXTMOD)/modules.builtin | ||
1361 | clean: $(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 | ||
1369 | help: | 1352 | help: |
1370 | @echo ' Building external modules.' | 1353 | @echo ' Building external modules.' |
@@ -1381,6 +1364,16 @@ prepare: ; | |||
1381 | scripts: ; | 1364 | scripts: ; |
1382 | endif # KBUILD_EXTMOD | 1365 | endif # KBUILD_EXTMOD |
1383 | 1366 | ||
1367 | clean: $(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 | # --------------------------------------------------------------------------- |
1386 | quiet_cmd_tags = GEN $@ | 1379 | quiet_cmd_tags = GEN $@ |