qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Makefile: Don't find and delete when $(DSOSUF) is e


From: Fam Zheng
Subject: [Qemu-devel] [PATCH] Makefile: Don't find and delete when $(DSOSUF) is empty in "make clean"
Date: Fri, 14 Mar 2014 16:38:20 +0800

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 <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]