Daniel P Berrange writes:
[...]
> diff --git a/Makefile b/Makefile
> index 48673cb..2b9ba60 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -70,9 +70,55 @@ GENERATED_SOURCES += trace/generated-helpers.c
 
>  ifeq ($(findstring ust,$(TRACE_BACKENDS)),ust)
>  GENERATED_HEADERS += trace/generated-ust-provider.h
> +GENERATED_HEADERS += trace/generated-ust-provider-all.h
>  GENERATED_SOURCES += trace/generated-ust.c
>  endif
 
> +GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace.h)
> +GENERATED_SOURCES += $(trace-events-subdirs:%=%/trace.c)
> +GENERATED_DTRACE =
> +ifdef CONFIG_TRACE_DTRACE
> +GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace-dtrace.h)
> +GENERATED_DTRACE += $(trace-events-subdirs:%=%/trace-dtrace.dtrace)
> +endif
> +ifdef CONFIG_TRACE_UST
> +GENERATED_HEADERS += $(trace-events-subdirs:%=%/trace-ust.h)
> +endif
> +
> +%/trace.h: $(SRC_PATH)/%/trace-events $(tracetool-y)
> +     $(call quiet-command,$(TRACETOOL) \
> +             --format=h \
> +             --backends=$(TRACE_BACKENDS) \
> +             --group=$(shell dirname $@ | tr /- _) \
> +             < $< > $@,"  GEN   $@")
> +
> +%/trace.c: $(SRC_PATH)/%/trace-events $(tracetool-y)
> +     $(call quiet-command,$(TRACETOOL) \
> +             --format=c \
> +             --backends=$(TRACE_BACKENDS) \
> +             --group=$(shell dirname $@ | tr /- _) \
> +             < $< > $@,"  GEN   $@")
> +
> +%/trace-ust.h: $(SRC_PATH)/%/trace-events $(tracetool-y)
> +     $(call quiet-command,$(TRACETOOL) \
> +             --format=ust-events-h \
> +             --backends=$(TRACE_BACKENDS) \
> +             --group=$(shell dirname $@ | tr /- _) \
> +             < $< > $@,"  GEN   $@")
> +
> +%/trace-dtrace.dtrace: $(SRC_PATH)/%/trace-events 
> $(BUILD_DIR)/config-host.mak $(tracetool-y)
> +     $(call quiet-command,$(TRACETOOL) \
> +             --format=d \
> +             --backends=$(TRACE_BACKENDS) \
> +             --group=$(shell dirname $@ | tr /- _) \
> +             < $< > $@,"  GEN   $@")
> +
> +%/trace-dtrace.h: %/trace-dtrace.dtrace $(tracetool-y)
> +     $(call quiet-command,dtrace -o $@ -h -s $<, "  GEN   $@")
> +
> +%/trace-dtrace.o: %/trace-dtrace.dtrace $(tracetool-y)
> +
> +
>  # Don't try to regenerate Makefile or configure
>  # We don't generate any of them
>  Makefile: ;

I'd rather keep the "generated-" prefix on all files that usually are not
directly included by QEMU developers.


Cheers,
  Lluis

Reply via email to