From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WONdH-0008T1-Sa for qemu-devel@nongnu.org; Fri, 14 Mar 2014 04:38:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WONdB-00048d-F4 for qemu-devel@nongnu.org; Fri, 14 Mar 2014 04:38:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50373) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WONdB-00045m-4E for qemu-devel@nongnu.org; Fri, 14 Mar 2014 04:38:17 -0400 From: Fam Zheng Date: Fri, 14 Mar 2014 16:38:20 +0800 Message-Id: <1394786300-18017-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH] Makefile: Don't find and delete when $(DSOSUF) is empty in "make clean" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Fam Zheng , Anthony Liguori , Stefan Weil , Michael Roth , stefanha@redhat.com, Paolo Bonzini DANGEROUS: don't try it before you read to the end. A first "make distclean" will unset $(DSOSUF), a following "make distclean" or "make clean" will find all the files and delete it. Including all the files in the .git directory! Fix it by only do it when $(DSOSUF) is not empty. Signed-off-by: Fam Zheng --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bd9cd4f..0666d6e 100644 --- a/Makefile +++ b/Makefile @@ -267,7 +267,7 @@ clean: rm -f qemu-options.def find . -name '*.[oda]' -type f -exec rm -f {} + find . -name '*.l[oa]' -type f -exec rm -f {} + - find . -name '*$(DSOSUF)' -type f -exec rm -f {} + + if test -n "$(DSOSUF)"; then find . -name '*$(DSOSUF)' -type f -exec rm -f {} +; fi find . -name '*.mo' -type f -exec rm -f {} + rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~ rm -f fsdev/*.pod -- 1.9.0