On 3/7/19 1:23 PM, BALATON Zoltan wrote:
> On Thu, 7 Mar 2019, Peter Maydell wrote:
>> On Thu, 7 Mar 2019 at 18:17, Marc-André Lureau
>> <marcandre.lur...@redhat.com> wrote:
>>> As someone who has also been annoyed having to support in-tree and
>>> out-of-tree, I support that move. I used to be a pretty happy use of
>>> in-tree builds, but out-of-tree his generally equally convenient.
>>>
>>> Who is volunteering to do patches to deprecate the support? warning in
>>> 4.0, and error in 4.1?
>>
>> Do we need to bother to deprecate it? It doesn't affect end-users,
>> only those who build QEMU, and the change is easy...
> 
> If you do this without warning and time for getting used to it, it would
> be nice to add some convenience functionality if possible to not upset
> people used to in-tree builds too much. That is if someone runs make in
> the top src dir it should create a build subdir and run make -C in there
> instead of just returning an error so people can still just run make as
> now instead of get frustrated every time until get used to use build
> dir. (I sometimes use build dir, sometimes in-tree build and the latter
> is often more convenient if I don't need multiple separate builds only
> one.)

You might be able to do something like (untested):

echo /GNUMakefile >> .git/info/exclude
cat > GNUMakefile <<\EOF
%: force
        @$(MAKE) -C subdir $@
force: ;

so that 'make blah' in-tree becomes a shim to a default out-of-tree
build location. (You'd need to make it smarter than that to handle a
user invoking 'make -C tests ...', left as an exercise for the reader)

But yes, ideally we'd actually have a proper wrapper Makefile that does
this as part of qemu.git, instead of having to be reinvented by each
developer.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to