[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
Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/2] Makefile: use full path for qapi-generated directory
Thu, 01 Dec 2011 10:05:02 -0600
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0
On 12/01/2011 09:19 AM, Stefano Stabellini wrote:
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
Really? Can you provide more specific details?
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
this has to work, right? It does not without the patch to fix the
generation of config-devices.mak.
To clarify, the first patch I sent fix a bug that's not currently
triggered due to qapi-dir always ending up being "qapi-generated/", so
the guardname generated works, albeit with some needlessly verbose names.
The second isn't intended to fix your issue with builds, but avoid
potential problems that may arise if at some point $(BUILD_DIR) !=
So they don't actually fix anything, just potential bugs that may arise
in the future.
The issue with doing out of tree builds with a dirty source directory is
really just an unsupported scenario. To really clean things up, you need
to run `make distclean` using the same configuration you used to dirty
the directory in the first place, otherwise even `make distclean` will
leave cruft laying in target directories not present in your current config.
Alexandre Raymond sent a patch to make it so that `make distclean`
always left the source directory pristine, but there was some contention
on what exactly a `make distclean` entails and it wasn't applied:
That's really the only complete fix for these build issues. I'm starting
to think it'd be worth it to add a `make clean_for_reals` target that
does what Alexandre's patch does and tell people to run it after a pull
or switching to out-of-tree builds.