Commit 6bd04bb48715dc8e8f6d1a3389f886698bba0dc0
Committed by
Tom Rini
1 parent
5a449d75bc
Exists in
v2017.01-smarct4x
and in
48 other branches
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>
Showing 3 changed files with 4 additions and 3 deletions Side-by-side Diff
Makefile
... | ... | @@ -1173,7 +1173,7 @@ |
1173 | 1173 | clean: rm-dirs := $(CLEAN_DIRS) |
1174 | 1174 | clean: rm-files := $(CLEAN_FILES) |
1175 | 1175 | |
1176 | -clean-dirs := $(foreach f,$(u-boot-alldirs),$(if $(wildcard $f/Makefile),$f)) | |
1176 | +clean-dirs := $(foreach f,$(u-boot-alldirs),$(if $(wildcard $(srctree)/$f/Makefile),$f)) | |
1177 | 1177 | |
1178 | 1178 | clean-dirs := $(addprefix _clean_, $(clean-dirs) doc/DocBook) |
1179 | 1179 |
dts/Makefile
scripts/Makefile.clean
... | ... | @@ -39,7 +39,8 @@ |
39 | 39 | |
40 | 40 | # Temporal work-around for U-Boot |
41 | 41 | |
42 | -subdir-ymn := $(foreach f, $(subdir-ymn), $(if $(wildcard $f/Makefile),$f)) | |
42 | +subdir-ymn := $(foreach f, $(subdir-ymn), \ | |
43 | + $(if $(wildcard $(srctree)/$f/Makefile),$f)) | |
43 | 44 | |
44 | 45 | # build a list of files to remove, usually relative to the current |
45 | 46 | # directory |