From efcf861931f987d82b11caed75b8c2ad9d709274 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 4 Feb 2014 17:24:40 +0900 Subject: 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 --- scripts/Makefile | 2 ++ scripts/Makefile.clean | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 scripts/Makefile (limited to 'scripts') diff --git a/scripts/Makefile b/scripts/Makefile new file mode 100644 index 0000000..ebbadc9 --- /dev/null +++ b/scripts/Makefile @@ -0,0 +1,2 @@ +# Let clean descend into subdirs +subdir- += basic diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean index 686cb0d..5cd0f51 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 -- cgit v1.1