[PATCH] clean.mk: reliability fix

Michael Shigorin mike на altlinux.org
Чт Окт 20 19:35:53 MSK 2011


The problem was observed by Oleg Ivanov and me too
but finally it did get the attention quantum.
---
 lib/clean.mk |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/clean.mk b/lib/clean.mk
index aa6aa45..1fe0576 100644
--- a/lib/clean.mk
+++ b/lib/clean.mk
@@ -17,7 +17,7 @@ clean:
 	@echo '** cleaning up $(WARNING)'
 	@find -name '*~' -delete >&/dev/null
 	@if [ -L build -a -d build/ ]; then \
-		$(MAKE) -C build $@ GLOBAL_BUILDDIR=$(shell readlink build) $(LOG); \
+		$(MAKE) -C build $@ GLOBAL_BUILDDIR=$(shell readlink build) $(LOG) ||:; \
 	fi
 
 # there can be some sense in writing log here even if normally
@@ -26,7 +26,8 @@ clean:
 distclean: clean
 	@if [ -L build -a -d build/ ]; then \
 		rm -rf build/.git; \
-		$(MAKE) -C build $@ GLOBAL_BUILDDIR=$(shell readlink build) $(LOG) && \
+		$(MAKE) -C build $@ GLOBAL_BUILDDIR=$(shell readlink build) $(LOG) || \
+			rm -rf build/; \
 		rm -r $(shell readlink build); \
 	fi
 	@rm -f build
-- 
1.7.6.4


--AqsLC8rIMeq19msA--


Подробная информация о списке рассылки Antique