aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJerome Forissier <jerome.forissier@linaro.org>2017-02-07 14:30:32 +0100
committerJerome Forissier <jerome.forissier@linaro.org>2017-02-08 14:43:52 +0100
commit30a443368252d5ac27074027b869182756fb25a3 (patch)
tree452c7ce69dacc6ac26ab68dfd4464382ce3ead0e /Makefile
parentaa4cc147a462a8a5effc4ccf5062a5eed38c0a5b (diff)
make clean: don't fail on non-empty directory
"make clean" may report errors when trying to clean with different configuration values than the ones used during the build. For instance: $ make -s CFG_RPMB_FS=y $ make clean CLEAN out/arm-plat-vexpress rmdir: failed to remove 'out/arm-plat-vexpress/core/tee': Directory not empty rmdir: failed to remove 'out/arm-plat-vexpress/core': Directory not empty rmdir: failed to remove 'out/arm-plat-vexpress': Directory not empty Makefile:88: recipe for target 'clean' failed make: *** [clean] Error 1 The clean command should not fail, since the build tree was properly cleaned for the requested configuration. Fix this by using 'rmdir --ignore-fail-on-non-empty'. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index bfea8989..c9bf9127 100644
--- a/Makefile
+++ b/Makefile
@@ -87,9 +87,9 @@ include mk/cleandirs.mk
clean:
@$(cmd-echo-silent) ' CLEAN $(out-dir)'
${q}rm -f $(cleanfiles)
- ${q}dirs="$(call cleandirs-for-rmdir)"; if [ "$$dirs" ]; then rmdir $$dirs; fi
+ ${q}dirs="$(call cleandirs-for-rmdir)"; if [ "$$dirs" ]; then $(RMDIR) $$dirs; fi
@if [ "$(out-dir)" != "$(O)" ]; then $(cmd-echo-silent) ' CLEAN $(O)'; fi
- ${q}if [ -d "$(O)" ]; then rmdir --ignore-fail-on-non-empty $(O); fi
+ ${q}if [ -d "$(O)" ]; then $(RMDIR) $(O); fi
.PHONY: cscope
cscope: