path: root/scripts/Makefile.clean
diff options
authorMasahiro Yamada <>2014-02-04 17:24:40 +0900
committerTom Rini <>2014-02-19 11:10:04 -0500
commitefcf861931f987d82b11caed75b8c2ad9d709274 (patch)
tree9989d4de32a3b3dcf3f54775dfcc8faebf159774 /scripts/Makefile.clean
parent2887c47338777cda675fc3aec8b88ab8dc18235d (diff)
kbuild: use scripts/Makefile.clean
This commit refactors cleaning targets such as clean, clobber, mrpropper, distclean with scripts/Makefile.clean. By using scripts/Makefile.clean, we can recursively descend into subdirectories and delete generated files there. We do not need add a big list of generated files to the "clean" target. Signed-off-by: Masahiro Yamada <>
Diffstat (limited to 'scripts/Makefile.clean')
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean
index 686cb0d31c..5cd0f51770 100644
--- a/scripts/Makefile.clean
+++ b/scripts/Makefile.clean
@@ -37,6 +37,10 @@ subdir-ymn := $(sort $(subdir-ym) $(subdir-n) $(subdir-))
subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn))
+# Temporal work-around for U-Boot
+subdir-ymn := $(foreach f, $(subdir-ymn), $(if $(wildcard $f/Makefile),$f))
# build a list of files to remove, usually relative to the current
# directory
OpenPOWER on IntegriCloud