Received: from eggs.gnu.org ([2001:4830:134:3::10]:34222) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPqB7-00049a-Q6 for qemu-devel@nongnu.org; Tue, 18 Mar 2014 05:19:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPqB3-0001FN-Nc for qemu-devel@nongnu.org; Tue, 18 Mar 2014 05:19:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5839) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPqB3-0001FJ-Ey for qemu-devel@nongnu.org; Tue, 18 Mar 2014 05:19:17 -0400 From: Markus Armbruster References: <1394786300-18017-1-git-send-email-famz@redhat.com> <53234132.8040301@weilnetz.de> <87y509fcrq.fsf@blackfin.pond.sub.org> <53274415.6050502@suse.de> Date: Tue, 18 Mar 2014 10:19:06 +0100 In-Reply-To: (Peter Maydell's message of "Mon, 17 Mar 2014 19:15:05 +0000") Message-ID: <87k3brvp85.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [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: Peter Maydell Cc: Fam Zheng , Stefan Hajnoczi , Stefan Weil , Michael Roth , QEMU Developers , Anthony Liguori , Paolo Bonzini , Andreas =?utf-8?Q?F=C3=A4rber?= Peter Maydell writes: > On 17 March 2014 18:51, Andreas F=C3=A4rber wrote: >> Am 17.03.2014 09:30, schrieb Markus Armbruster: >>> Stefan Weil writes: >>> >>>> Am 14.03.2014 09:38, schrieb Fam Zheng: >>>>> 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! >>>> >>>> If you only use out-of-tree build, you are safe here. Maybe we should = no >>>> longer support in-tree builds. Personally, I nearly never use them. >>> >>> Same here. Building in-tree is calling for trouble. I'd support a >>> patch that prevents it. >> >> What about disabling it only when .git/ is available? > > The other idea that's been suggested in the past is to > have the makefile/configure simply map attempts to build > in-tree into 'create builddir and build in it'. This > is probably easier to suggest than to get right in all > situations :-) Perfect is the enemy of good enough. all: %: force @$(MAKE) -C bld $@ force: ;