diff options
author | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2014-03-28 09:55:02 +0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-03-28 23:06:32 +0400 |
commit | 6bd04bb48715dc8e8f6d1a3389f886698bba0dc0 (patch) | |
tree | b29a23e12167974244d4a6823cb56698dbd162bb | |
parent | 5a449d75bca1e8798571cb04093553593e5ed73e (diff) | |
download | u-boot-6bd04bb48715dc8e8f6d1a3389f886698bba0dc0.tar.xz |
kbuild: fix bugs in cleaning targets
"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>
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | dts/Makefile | 2 | ||||
-rw-r--r-- | scripts/Makefile.clean | 3 |
3 files changed, 4 insertions, 3 deletions
@@ -1173,7 +1173,7 @@ MRPROPER_FILES += .config .config.old \ 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) diff --git a/dts/Makefile b/dts/Makefile index 9907463fc6..e59550c9d2 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -44,4 +44,4 @@ dtbs: $(obj)/dt.dtb 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 diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean index 5cd0f51770..d6dcd47f6f 100644 --- a/scripts/Makefile.clean +++ b/scripts/Makefile.clean @@ -39,7 +39,8 @@ subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn)) # 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 |