From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:41938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RWBNb-0008UM-3Y for qemu-devel@nongnu.org; Thu, 01 Dec 2011 13:29:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RWBNa-0003qn-8d for qemu-devel@nongnu.org; Thu, 01 Dec 2011 13:29:07 -0500 Message-ID: <4ED7C76A.6060407@codemonkey.ws> Date: Thu, 01 Dec 2011 12:28:58 -0600 From: Anthony Liguori 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> In-Reply-To: <4ED7C342.3060302@weilnetz.de> 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: Stefan Weil Cc: "qemu-trivial@nongnu.org" , Stefan Hajnoczi , "qemu-devel@nongnu.org" , Michael Roth , Stefano Stabellini 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. Regards, Anthony Liguori > >> >> this has to work, right? It does not without the patch to fix the >> generation of config-devices.mak. > > No. You'll need a 'make distclean'. If that does what it should do, > a following out-of-tree build will work. > > Regards, > Stefan Weil > >