diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 33 |
1 files changed, 13 insertions, 20 deletions
@@ -1137,21 +1137,13 @@ MRPROPER_FILES += .config .config.old .version .old_version \ | |||
1137 | # | 1137 | # |
1138 | clean: rm-dirs := $(CLEAN_DIRS) | 1138 | clean: rm-dirs := $(CLEAN_DIRS) |
1139 | clean: rm-files := $(CLEAN_FILES) | 1139 | clean: rm-files := $(CLEAN_FILES) |
1140 | clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs) Documentation) | 1140 | clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation) |
1141 | 1141 | ||
1142 | PHONY += $(clean-dirs) clean archclean | 1142 | PHONY += $(clean-dirs) clean archclean |
1143 | $(clean-dirs): | 1143 | $(clean-dirs): |
1144 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) | 1144 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) |
1145 | 1145 | ||
1146 | clean: archclean $(clean-dirs) | 1146 | clean: 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 | ||
1354 | clean: rm-dirs := $(MODVERDIR) | 1346 | clean: rm-dirs := $(MODVERDIR) |
1355 | clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers \ | 1347 | clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers |
1356 | $(KBUILD_EXTMOD)/modules.order \ | ||
1357 | $(KBUILD_EXTMOD)/modules.builtin | ||
1358 | clean: $(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 | ||
1366 | help: | 1349 | help: |
1367 | @echo ' Building external modules.' | 1350 | @echo ' Building external modules.' |
@@ -1378,6 +1361,16 @@ prepare: ; | |||
1378 | scripts: ; | 1361 | scripts: ; |
1379 | endif # KBUILD_EXTMOD | 1362 | endif # KBUILD_EXTMOD |
1380 | 1363 | ||
1364 | clean: $(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 | # --------------------------------------------------------------------------- |
1383 | quiet_cmd_tags = GEN $@ | 1376 | quiet_cmd_tags = GEN $@ |