[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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v4 0/8] Switch all subdirs over to modular trace.h file, Daniel P. Berrange, 2017/01/25
- [Qemu-devel] [PATCH v4 1/8] make: move top level dir to end of include search path, Daniel P. Berrange, 2017/01/25
- Re: [Qemu-devel] [PATCH v4 1/8] make: move top level dir to end of include search path,
Eric Blake <=
- [Qemu-devel] [PATCH v4 2/8] trace: move hw/block/dataplane events to correct subdir, Daniel P. Berrange, 2017/01/25
- [Qemu-devel] [PATCH v4 3/8] trace: move hw/xen events to correct subdir, Daniel P. Berrange, 2017/01/25
- [Qemu-devel] [PATCH v4 4/8] trace: move hw/i386/xen events to correct subdir, Daniel P. Berrange, 2017/01/25
- [Qemu-devel] [PATCH v4 5/8] trace: move setting of group name into Makefiles, Daniel P. Berrange, 2017/01/25
- [Qemu-devel] [PATCH v4 7/8] trace: update docs to reflect new code generation approach, Daniel P. Berrange, 2017/01/25
- [Qemu-devel] [PATCH v4 8/8] trace: improve error reporting when parsing simpletrace header, Daniel P. Berrange, 2017/01/25
- [Qemu-devel] [PATCH v4 6/8] trace: switch to modular code generation for sub-directories, Daniel P. Berrange, 2017/01/25
- Re: [Qemu-devel] [PATCH v4 0/8] Switch all subdirs over to modular trace.h file, Stefan Hajnoczi, 2017/01/30