diff options
author | Michal Marek <mmarek@suse.cz> | 2010-09-06 06:00:08 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-09-06 06:00:08 -0400 |
commit | 88d7be031f9f975bb3f50a0b5ef3796a671e7edf (patch) | |
tree | d9bda19b9cb14b18fcebb38307b158eaeb27d27b | |
parent | c47f214ac65a45597917e017b7a1c617a56ac1cb (diff) |
kbuild: Use a single clean rule for kernel and external modules
The list of patterns for the external modules case was constantly
lagging behind.
Signed-off-by: Michal Marek <mmarek@suse.cz>
-rw-r--r-- | Makefile | 31 |
1 files changed, 12 insertions, 19 deletions
@@ -1186,15 +1186,7 @@ PHONY += $(clean-dirs) clean archclean | |||
1186 | $(clean-dirs): | 1186 | $(clean-dirs): |
1187 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) | 1187 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) |
1188 | 1188 | ||
1189 | clean: archclean $(clean-dirs) | 1189 | clean: archclean |
1190 | $(call cmd,rmdirs) | ||
1191 | $(call cmd,rmfiles) | ||
1192 | @find . $(RCS_FIND_IGNORE) \ | ||
1193 | \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ | ||
1194 | -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ | ||
1195 | -o -name '*.symtypes' -o -name 'modules.order' \ | ||
1196 | -o -name modules.builtin -o -name '.tmp_*.o.*' \ | ||
1197 | -o -name '*.gcno' \) -type f -print | xargs rm -f | ||
1198 | 1190 | ||
1199 | # mrproper - Delete all generated files, including .config | 1191 | # mrproper - Delete all generated files, including .config |
1200 | # | 1192 | # |
@@ -1392,16 +1384,7 @@ $(clean-dirs): | |||
1392 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) | 1384 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) |
1393 | 1385 | ||
1394 | clean: rm-dirs := $(MODVERDIR) | 1386 | clean: rm-dirs := $(MODVERDIR) |
1395 | clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers \ | 1387 | clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers |
1396 | $(KBUILD_EXTMOD)/modules.order \ | ||
1397 | $(KBUILD_EXTMOD)/modules.builtin | ||
1398 | clean: $(clean-dirs) | ||
1399 | $(call cmd,rmdirs) | ||
1400 | $(call cmd,rmfiles) | ||
1401 | @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \ | ||
1402 | \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ | ||
1403 | -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ | ||
1404 | -o -name '*.gcno' \) -type f -print | xargs rm -f | ||
1405 | 1388 | ||
1406 | help: | 1389 | help: |
1407 | @echo ' Building external modules.' | 1390 | @echo ' Building external modules.' |
@@ -1418,6 +1401,16 @@ prepare: ; | |||
1418 | scripts: ; | 1401 | scripts: ; |
1419 | endif # KBUILD_EXTMOD | 1402 | endif # KBUILD_EXTMOD |
1420 | 1403 | ||
1404 | clean: $(clean-dirs) | ||
1405 | $(call cmd,rmdirs) | ||
1406 | $(call cmd,rmfiles) | ||
1407 | @find $(or $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \ | ||
1408 | \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ | ||
1409 | -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ | ||
1410 | -o -name '*.symtypes' -o -name 'modules.order' \ | ||
1411 | -o -name modules.builtin -o -name '.tmp_*.o.*' \ | ||
1412 | -o -name '*.gcno' \) -type f -print | xargs rm -f | ||
1413 | |||
1421 | # Generate tags for editors | 1414 | # Generate tags for editors |
1422 | # --------------------------------------------------------------------------- | 1415 | # --------------------------------------------------------------------------- |
1423 | quiet_cmd_tags = GEN $@ | 1416 | quiet_cmd_tags = GEN $@ |