qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.8 v1 17/60] trace: introduce some Makefile


From: Lluís Vilanova
Subject: Re: [Qemu-devel] [PATCH for-2.8 v1 17/60] trace: introduce some Makefile rules for module code gen
Date: Wed, 10 Aug 2016 16:18:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

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

[Prev in Thread] Current Thread [Next in Thread]