diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 33 |
1 files changed, 13 insertions, 20 deletions
@@ -1119,21 +1119,13 @@ MRPROPER_FILES += .config .config.old .version .old_version \ | |||
1119 | # | 1119 | # |
1120 | clean: rm-dirs := $(CLEAN_DIRS) | 1120 | clean: rm-dirs := $(CLEAN_DIRS) |
1121 | clean: rm-files := $(CLEAN_FILES) | 1121 | clean: rm-files := $(CLEAN_FILES) |
1122 | clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs) Documentation) | 1122 | clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation) |
1123 | 1123 | ||
1124 | PHONY += $(clean-dirs) clean archclean | 1124 | PHONY += $(clean-dirs) clean archclean |
1125 | $(clean-dirs): | 1125 | $(clean-dirs): |
1126 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) | 1126 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) |
1127 | 1127 | ||
1128 | clean: archclean $(clean-dirs) | 1128 | clean: archclean |
1129 | $(call cmd,rmdirs) | ||
1130 | $(call cmd,rmfiles) | ||
1131 | @find . $(RCS_FIND_IGNORE) \ | ||
1132 | \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ | ||
1133 | -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ | ||
1134 | -o -name '*.symtypes' -o -name 'modules.order' \ | ||
1135 | -o -name modules.builtin -o -name '.tmp_*.o.*' \ | ||
1136 | -o -name '*.gcno' \) -type f -print | xargs rm -f | ||
1137 | 1129 | ||
1138 | # mrproper - Delete all generated files, including .config | 1130 | # mrproper - Delete all generated files, including .config |
1139 | # | 1131 | # |
@@ -1331,16 +1323,7 @@ $(clean-dirs): | |||
1331 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) | 1323 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) |
1332 | 1324 | ||
1333 | clean: rm-dirs := $(MODVERDIR) | 1325 | clean: rm-dirs := $(MODVERDIR) |
1334 | clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers \ | 1326 | clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers |
1335 | $(KBUILD_EXTMOD)/modules.order \ | ||
1336 | $(KBUILD_EXTMOD)/modules.builtin | ||
1337 | clean: $(clean-dirs) | ||
1338 | $(call cmd,rmdirs) | ||
1339 | $(call cmd,rmfiles) | ||
1340 | @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \ | ||
1341 | \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ | ||
1342 | -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ | ||
1343 | -o -name '*.gcno' \) -type f -print | xargs rm -f | ||
1344 | 1327 | ||
1345 | help: | 1328 | help: |
1346 | @echo ' Building external modules.' | 1329 | @echo ' Building external modules.' |
@@ -1357,6 +1340,16 @@ prepare: ; | |||
1357 | scripts: ; | 1340 | scripts: ; |
1358 | endif # KBUILD_EXTMOD | 1341 | endif # KBUILD_EXTMOD |
1359 | 1342 | ||
1343 | clean: $(clean-dirs) | ||
1344 | $(call cmd,rmdirs) | ||
1345 | $(call cmd,rmfiles) | ||
1346 | @find $(or $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \ | ||
1347 | \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ | ||
1348 | -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ | ||
1349 | -o -name '*.symtypes' -o -name 'modules.order' \ | ||
1350 | -o -name modules.builtin -o -name '.tmp_*.o.*' \ | ||
1351 | -o -name '*.gcno' \) -type f -print | xargs rm -f | ||
1352 | |||
1360 | # Generate tags for editors | 1353 | # Generate tags for editors |
1361 | # --------------------------------------------------------------------------- | 1354 | # --------------------------------------------------------------------------- |
1362 | quiet_cmd_tags = GEN $@ | 1355 | quiet_cmd_tags = GEN $@ |