"make clean", "make clobber", "make mrproper" and "make distclean"
missed to clean-up some files when they were run with
O=<some_dir> option.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reported-by: Wolfgang Denk <wd@denx.de>
clean: rm-dirs := $(CLEAN_DIRS)
clean: rm-files := $(CLEAN_FILES)
-clean-dirs := $(foreach f,$(u-boot-alldirs),$(if $(wildcard $f/Makefile),$f))
+clean-dirs := $(foreach f,$(u-boot-alldirs),$(if $(wildcard $(srctree)/$f/Makefile),$f))
clean-dirs := $(addprefix _clean_, $(clean-dirs) doc/DocBook)
clean-files := dt.dtb.S
# Let clean descend into dts directories
-subdir- += ../arch/*/dts
+subdir- += ../arch/arm/dts ../arch/microblaze/dts ../arch/sandbox/dts ../arch/x86/dts
# Temporal work-around for U-Boot
-subdir-ymn := $(foreach f, $(subdir-ymn), $(if $(wildcard $f/Makefile),$f))
+subdir-ymn := $(foreach f, $(subdir-ymn), \
+ $(if $(wildcard $(srctree)/$f/Makefile),$f))
# build a list of files to remove, usually relative to the current
# directory