qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] trace: ensure $(tracetool-y) is defined in top level makefile
@ 2017-03-15 10:56 Daniel P. Berrange
  2017-03-15 11:44 ` Eric Blake
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel P. Berrange @ 2017-03-15 10:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Eric Blake, Stefan Hajnoczi, Daniel P. Berrange

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 <berrange@redhat.com>
---
 Makefile | 3 +++
 1 file changed, 3 insertions(+)

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")
+
 %/trace.h: %/trace.h-timestamp
 	@cmp $< $@ >/dev/null 2>&1 || cp $< $@
 %/trace.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y)
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-15 11:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-15 10:56 [Qemu-devel] [PATCH] trace: ensure $(tracetool-y) is defined in top level makefile Daniel P. Berrange
2017-03-15 11:44 ` Eric Blake
2017-03-15 11:46   ` Daniel P. Berrange

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).