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 <f...@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