qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/2] Makefile: use full path for


From: Anthony Liguori
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/2] Makefile: use full path for qapi-generated directory
Date: Thu, 01 Dec 2011 12:28:58 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Thunderbird/3.1.13

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]