From 30a443368252d5ac27074027b869182756fb25a3 Mon Sep 17 00:00:00 2001 From: Jerome Forissier Date: Tue, 7 Feb 2017 14:30:32 +0100 Subject: 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 Reviewed-by: Jens Wiklander Reviewed-by: Etienne Carriere --- ta/mk/ta_dev_kit.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ta/mk') diff --git a/ta/mk/ta_dev_kit.mk b/ta/mk/ta_dev_kit.mk index 0e0e367d..fab5df03 100644 --- a/ta/mk/ta_dev_kit.mk +++ b/ta/mk/ta_dev_kit.mk @@ -74,9 +74,9 @@ include $(ta-dev-kit-dir)/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 @$(cmd-echo-silent) ' CLEAN $(O)' - ${q}if [ -d "$(O)" ]; then rmdir --ignore-fail-on-non-empty $(O); fi + ${q}if [ -d "$(O)" ]; then $(RMDIR) $(O); fi subdirs = . include $(ta-dev-kit-dir)/mk/subdir.mk -- cgit v1.2.3