[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] trace: ensure $(tracetool-y) is defined in top
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH] trace: ensure $(tracetool-y) is defined in top level makefile |
Date: |
Wed, 15 Mar 2017 06:44:25 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 03/15/2017 05:56 AM, Daniel P. Berrange wrote:
> The build rules for trace files have a dependancy on $(tracetool-y).
> This variable populated in the trace/Makefile.objs file and thus its
> definition gets pulled into the top level makefile. This happens too
> late in the process though, so by the time $(tracetool-y) is defined,
> make has already evaluated $(tracetool-y) in the dependancies and
> found it to be empty. The result is that when the tracetool source
> is changed, the generated files are not rebuilt. The solution is to
> define the variable in the top level makefile too
>
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
> Makefile | 3 +++
> 1 file changed, 3 insertions(+)
Does this mean the definitions in trace/Makefile.objs are now redundant
and can be omitted?
>
> diff --git a/Makefile b/Makefile
> index 1c4c04f..dffc74b 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -85,6 +85,9 @@ GENERATED_SOURCES += $(TRACE_SOURCES)
>
> trace-group-name = $(shell dirname $1 | sed -e 's/[^a-zA-Z0-9]/_/g')
>
> +tracetool-y = $(SRC_PATH)/scripts/tracetool.py
> +tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py")
Should this also include the comment currently in trace/Makefile.objs:
######################################################################
# tracetool source files
# Every rule that invokes tracetool must depend on this so code is
regenerated
# if tracetool itself changes.
But it certainly looks like you're on the right track for fixing the
issue I ran into.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature