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> Reviewed-by: Eric Blake <eblake@redhat.com> Tested-by: Eric Blake <eblake@redhat.com> Message-id: 20170315123421.28815-1-berrange@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
60 lines
2 KiB
Makefile
60 lines
2 KiB
Makefile
# -*- mode: makefile -*-
|
|
|
|
$(BUILD_DIR)/trace-events-all: $(trace-events-files)
|
|
$(call quiet-command,cat $^ > $@)
|
|
|
|
|
|
##################################################
|
|
# Translation level
|
|
|
|
$(obj)/generated-helpers-wrappers.h: $(obj)/generated-helpers-wrappers.h-timestamp
|
|
@cmp $< $@ >/dev/null 2>&1 || cp $< $@
|
|
$(obj)/generated-helpers-wrappers.h-timestamp: $(trace-events-files) $(BUILD_DIR)/config-host.mak $(tracetool-y)
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
--group=all \
|
|
--format=tcg-helper-wrapper-h \
|
|
--backend=$(TRACE_BACKENDS) \
|
|
$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
|
|
|
|
$(obj)/generated-helpers.h: $(obj)/generated-helpers.h-timestamp
|
|
@cmp $< $@ >/dev/null 2>&1 || cp $< $@
|
|
$(obj)/generated-helpers.h-timestamp: $(trace-events-files) $(BUILD_DIR)/config-host.mak $(tracetool-y)
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
--group=all \
|
|
--format=tcg-helper-h \
|
|
--backend=$(TRACE_BACKENDS) \
|
|
$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
|
|
|
|
$(obj)/generated-helpers.c: $(obj)/generated-helpers.c-timestamp
|
|
@cmp $< $@ >/dev/null 2>&1 || cp $< $@
|
|
$(obj)/generated-helpers.c-timestamp: $(trace-events-files) $(BUILD_DIR)/config-host.mak $(tracetool-y)
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
--group=all \
|
|
--format=tcg-helper-c \
|
|
--backend=$(TRACE_BACKENDS) \
|
|
$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
|
|
|
|
$(obj)/generated-helpers.o: $(obj)/generated-helpers.c
|
|
|
|
target-obj-y += generated-helpers.o
|
|
|
|
|
|
$(obj)/generated-tcg-tracers.h: $(obj)/generated-tcg-tracers.h-timestamp
|
|
@cmp $< $@ >/dev/null 2>&1 || cp $< $@
|
|
$(obj)/generated-tcg-tracers.h-timestamp: $(trace-events-files) $(BUILD_DIR)/config-host.mak $(tracetool-y)
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
--group=all \
|
|
--format=tcg-h \
|
|
--backend=$(TRACE_BACKENDS) \
|
|
$< > $@,"GEN","$(patsubst %-timestamp,%,$@)")
|
|
|
|
|
|
######################################################################
|
|
# Backend code
|
|
|
|
util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o
|
|
util-obj-$(CONFIG_TRACE_FTRACE) += ftrace.o
|
|
util-obj-y += control.o
|
|
target-obj-y += control-target.o
|
|
util-obj-y += qmp.o
|