qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 1/8] make: move top level dir to end of inclu


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v4 1/8] make: move top level dir to end of include search path
Date: Wed, 25 Jan 2017 10:25:51 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

On 01/25/2017 10:14 AM, Daniel P. Berrange wrote:

> If there are generated headers files to be used by the migration
> code in '$BUILD_DIR/migration', these will not be found by the
> relative include, an absolute include is needed instead. This
> has not been a problem so far, since nothing has been generating
> headers in sub-dirs, but the trace code will shortly be doing
> that. So it is needed to list '-I$(BUILD_DIR)/$(@D)' as well as
> '-I$(@D)' to ensure both directories are searched when building
> target dependant code. So the search order ends up being:
> 
>   1. source dir corresponding to input file (implicit by compiler)
>   2. build dir corresponding to output file (absolute)
>   3. build dir corresponding to output file (relative to cwd)
>   4. top level build dir
>   5. top level source dir
>   6. top level source include/ dir

Lots clearer than v3.

> 
> One final complication is that the absolute '-I$(BUILD_DIR)/$(@D)'
> will sometimes end up pointing to a non-existant directory if
> that sub-dir does not have any target-independant files to be
> built. Rather than try to dynamically filter this, a simple
> 'mkdir' ensures $(BUILD_DIR)/$(@D) is guaranteed to exist at
> all times.
> 
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
>  rules.mak | 30 +++++++++++++++++++++++-------
>  1 file changed, 23 insertions(+), 7 deletions(-)

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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