qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Makefile: Don't find and delete when $(DSOSUF) is empty in "make clean"
@ 2014-03-14  8:38 Fam Zheng
  2014-03-14 12:13 ` Stefan Hajnoczi
  2014-03-14 17:49 ` Stefan Weil
  0 siblings, 2 replies; 9+ messages in thread
From: Fam Zheng @ 2014-03-14  8:38 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Anthony Liguori, Stefan Weil, Michael Roth, stefanha,
	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 <famz@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-03-18  9:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-14  8:38 [Qemu-devel] [PATCH] Makefile: Don't find and delete when $(DSOSUF) is empty in "make clean" Fam Zheng
2014-03-14 12:13 ` Stefan Hajnoczi
2014-03-14 17:49 ` Stefan Weil
2014-03-17  1:34   ` Fam Zheng
2014-03-17  8:30   ` Markus Armbruster
2014-03-17 18:51     ` Andreas Färber
2014-03-17 19:15       ` Peter Maydell
2014-03-18  9:19         ` Markus Armbruster
2014-03-18  8:24       ` Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).