From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWC4c-0005Ez-PT for qemu-devel@nongnu.org; Thu, 01 Dec 2011 14:13:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RWC4b-00068m-8C for qemu-devel@nongnu.org; Thu, 01 Dec 2011 14:13:34 -0500 Received: from e38.co.us.ibm.com ([32.97.110.159]:47865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWC4b-00066n-16 for qemu-devel@nongnu.org; Thu, 01 Dec 2011 14:13:33 -0500 Received: from /spool/local by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 1 Dec 2011 12:13:29 -0700 Message-ID: <4ED7D1B8.1060604@linux.vnet.ibm.com> Date: Thu, 01 Dec 2011 13:12:56 -0600 From: Michael Roth MIME-Version: 1.0 References: <4ED3F1C3.4060601@weilnetz.de> <1322606869-25865-1-git-send-email-mdroth@linux.vnet.ibm.com> <1322606869-25865-2-git-send-email-mdroth@linux.vnet.ibm.com> <4ED68B19.7050704@weilnetz.de> <4ED7C342.3060302@weilnetz.de> <4ED7C76A.6060407@codemonkey.ws> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/2] Makefile: use full path for qapi-generated directory List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini Cc: "qemu-trivial@nongnu.org" , Stefan Weil , "qemu-devel@nongnu.org" , Stefan Hajnoczi On 12/01/2011 12:42 PM, Stefano Stabellini wrote: > On Thu, 1 Dec 2011, Anthony Liguori wrote: >> On 12/01/2011 12:11 PM, Stefan Weil wrote: >>> Am 01.12.2011 16:19, schrieb Stefano Stabellini: >>>> On Wed, 30 Nov 2011, Stefan Weil wrote: >>>>> It's common to use either out-of-tree builds or in-tree builds, >>>>> but not to mix both variants with a common root directory. >>>>> I think QEMU should explicitly forbid that mixed scenario (like >>>>> other projects do). >>>>> >>>>> Even with your fix there can remain problems with generated >>>>> header files. >>>> >>>> Really? Can you provide more specific details? >>> >>> Yes. Suppose different generated header files with the same name >>> exist in the source directory tree and in the build directory tree. >>> >>> Then compiler options (the order of -I options) will determine >>> which of two header files with same name will be used in out-of-tree >>> builds. If the wrong one (that from the source directory tree) is used, >>> the compiler might fail or produce wrong code (for example when >>> macro values changed). >>>>> The mixed scenario creates unnecessary complexity. >>>>> Without the mixed scenario, your patch is not needed. >>>> >>>> I agree that supporting the mixed scenario shouldn't be a priority. >>>> However without this last patch a "make clean" on the main tree is not >>>> enough to allow out of tree builds. >>>> >>>> Try the following scenario: >>>> >>>> - cd qemu; ./configure; make >>>> >>>> - make clean >>>> >>>> - cd ../temp; ./configure --source-path=../qemu; make >>> >>> Which ./configure do you run in an empty temp directory? >>> This example (like similar ones in your previous mail) won't work. >> >> Yes, you must do external builds only from a clean source directory. This is a >> perfectly normal requirement. In fact, I can't think of a project that doesn't >> require this. > > Fair enough. > > In that case, like Michael Roth wrote, the patch "Makefile: use full > path for qapi-generated directory" doesn't actually fix anything, so > probably we don't need it either, but I'll leave it up to you. > Yup, it's just to address some potential issues/suggestions Stefan Weil pointed out. I think patch 1 should be applied though.