[Top][All Lists]

[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: Michael Roth
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/2] Makefile: use full path for qapi-generated directory
Date: Thu, 01 Dec 2011 13:12:56 -0600
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0

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.

reply via email to

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