Pull request
Tracing makefile fixes for QEMU 2.9. -----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJYyjcKAAoJEJykq7OBq3PIlYoH/2x7ADmCL6TK0ORbmsUqqv3M KaAPUT/dbNEumoeqm1a0uDJO/d6m2D8qlwQ4wT72uvp5jwWSzqoUqw6Bg7ojEnjS wKlDnGuViKkBkhauNl1FcDzELvkEdCZ3mxy0Zvp1F4r86hwPEMjwRDXpjlOtLTFi 6EsH3jp4aR/g86EHaWC3whAoyHqFGwyZATwI2QxZjt+mPAUBzwsbe5RgqMBaqyS/ NkxdcXBKyACYm8wnpgI3cI/sY/bSP9o1vA/CnN0z7ag70L9Gdh0TmRvOKKsp2rLM yMFneJRFLgHRZ2eXm0y30gv81hb1hcsx6ZXt4e8Ymg2LnY0e2JpSRG0iizFLyac= =vZRY -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging Pull request Tracing makefile fixes for QEMU 2.9. # gpg: Signature made Thu 16 Mar 2017 06:56:10 GMT # gpg: using RSA key 0x9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/tracing-pull-request: trace: ensure $(tracetool-y) is defined in top level makefile makefile: generate trace-events-all upfront makefile: merge GENERATED_HEADERS & GENERATED_SOURCES variables Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
		
						commit
						094a9a7cd6
					
				
							
								
								
									
										42
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										42
									
								
								Makefile
								
								
								
								
							| 
						 | 
				
			
			@ -50,24 +50,24 @@ endif
 | 
			
		|||
 | 
			
		||||
include $(SRC_PATH)/rules.mak
 | 
			
		||||
 | 
			
		||||
GENERATED_HEADERS = qemu-version.h config-host.h qemu-options.def
 | 
			
		||||
GENERATED_HEADERS += qmp-commands.h qapi-types.h qapi-visit.h qapi-event.h
 | 
			
		||||
GENERATED_SOURCES += qmp-marshal.c qapi-types.c qapi-visit.c qapi-event.c
 | 
			
		||||
GENERATED_HEADERS += qmp-introspect.h
 | 
			
		||||
GENERATED_SOURCES += qmp-introspect.c
 | 
			
		||||
GENERATED_FILES = qemu-version.h config-host.h qemu-options.def
 | 
			
		||||
GENERATED_FILES += qmp-commands.h qapi-types.h qapi-visit.h qapi-event.h
 | 
			
		||||
GENERATED_FILES += qmp-marshal.c qapi-types.c qapi-visit.c qapi-event.c
 | 
			
		||||
GENERATED_FILES += qmp-introspect.h
 | 
			
		||||
GENERATED_FILES += qmp-introspect.c
 | 
			
		||||
 | 
			
		||||
GENERATED_HEADERS += trace/generated-tcg-tracers.h
 | 
			
		||||
GENERATED_FILES += trace/generated-tcg-tracers.h
 | 
			
		||||
 | 
			
		||||
GENERATED_HEADERS += trace/generated-helpers-wrappers.h
 | 
			
		||||
GENERATED_HEADERS += trace/generated-helpers.h
 | 
			
		||||
GENERATED_SOURCES += trace/generated-helpers.c
 | 
			
		||||
GENERATED_FILES += trace/generated-helpers-wrappers.h
 | 
			
		||||
GENERATED_FILES += trace/generated-helpers.h
 | 
			
		||||
GENERATED_FILES += trace/generated-helpers.c
 | 
			
		||||
 | 
			
		||||
ifdef CONFIG_TRACE_UST
 | 
			
		||||
GENERATED_HEADERS += trace-ust-all.h
 | 
			
		||||
GENERATED_SOURCES += trace-ust-all.c
 | 
			
		||||
GENERATED_FILES += trace-ust-all.h
 | 
			
		||||
GENERATED_FILES += trace-ust-all.c
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
GENERATED_HEADERS += module_block.h
 | 
			
		||||
GENERATED_FILES += module_block.h
 | 
			
		||||
 | 
			
		||||
TRACE_HEADERS = trace-root.h $(trace-events-subdirs:%=%/trace.h)
 | 
			
		||||
TRACE_SOURCES = trace-root.c $(trace-events-subdirs:%=%/trace.c)
 | 
			
		||||
| 
						 | 
				
			
			@ -80,11 +80,15 @@ ifdef CONFIG_TRACE_UST
 | 
			
		|||
TRACE_HEADERS += trace-ust-root.h $(trace-events-subdirs:%=%/trace-ust.h)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
GENERATED_HEADERS += $(TRACE_HEADERS)
 | 
			
		||||
GENERATED_SOURCES += $(TRACE_SOURCES)
 | 
			
		||||
GENERATED_FILES += $(TRACE_HEADERS)
 | 
			
		||||
GENERATED_FILES += $(TRACE_SOURCES)
 | 
			
		||||
GENERATED_FILES += $(BUILD_DIR)/trace-events-all
 | 
			
		||||
 | 
			
		||||
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)
 | 
			
		||||
| 
						 | 
				
			
			@ -485,11 +489,10 @@ clean:
 | 
			
		|||
	rm -f fsdev/*.pod
 | 
			
		||||
	rm -f qemu-img-cmds.h
 | 
			
		||||
	rm -f ui/shader/*-vert.h ui/shader/*-frag.h
 | 
			
		||||
	@# May not be present in GENERATED_HEADERS
 | 
			
		||||
	@# May not be present in GENERATED_FILES
 | 
			
		||||
	rm -f trace/generated-tracers-dtrace.dtrace*
 | 
			
		||||
	rm -f trace/generated-tracers-dtrace.h*
 | 
			
		||||
	rm -f $(foreach f,$(GENERATED_HEADERS),$(f) $(f)-timestamp)
 | 
			
		||||
	rm -f $(foreach f,$(GENERATED_SOURCES),$(f) $(f)-timestamp)
 | 
			
		||||
	rm -f $(foreach f,$(GENERATED_FILES),$(f) $(f)-timestamp)
 | 
			
		||||
	rm -rf qapi-generated
 | 
			
		||||
	rm -rf qga/qapi-generated
 | 
			
		||||
	for d in $(ALL_SUBDIRS); do \
 | 
			
		||||
| 
						 | 
				
			
			@ -593,8 +596,7 @@ endif
 | 
			
		|||
endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
install: all $(if $(BUILD_DOCS),install-doc) $(BUILD_DIR)/trace-events-all \
 | 
			
		||||
install-datadir install-localstatedir
 | 
			
		||||
install: all $(if $(BUILD_DOCS),install-doc) install-datadir install-localstatedir
 | 
			
		||||
ifneq ($(TOOLS),)
 | 
			
		||||
	$(call install-prog,$(subst qemu-ga,qemu-ga$(EXESUF),$(TOOLS)),$(DESTDIR)$(bindir))
 | 
			
		||||
endif
 | 
			
		||||
| 
						 | 
				
			
			@ -787,7 +789,7 @@ endif # CONFIG_WIN
 | 
			
		|||
# Add a dependency on the generated files, so that they are always
 | 
			
		||||
# rebuilt before other object files
 | 
			
		||||
ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))
 | 
			
		||||
Makefile: $(GENERATED_HEADERS)
 | 
			
		||||
Makefile: $(GENERATED_FILES)
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
.SECONDARY: $(TRACE_HEADERS) $(TRACE_HEADERS:%=%-timestamp) \
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -162,7 +162,7 @@ else
 | 
			
		|||
obj-y += hw/$(TARGET_BASE_ARCH)/
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
GENERATED_HEADERS += hmp-commands.h hmp-commands-info.h
 | 
			
		||||
GENERATED_FILES += hmp-commands.h hmp-commands-info.h
 | 
			
		||||
 | 
			
		||||
endif # CONFIG_SOFTMMU
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -238,5 +238,5 @@ ifdef CONFIG_TRACE_SYSTEMTAP
 | 
			
		|||
	$(INSTALL_DATA) $(QEMU_PROG)-simpletrace.stp "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG)-simpletrace.stp"
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
GENERATED_HEADERS += config-target.h
 | 
			
		||||
Makefile: $(GENERATED_HEADERS)
 | 
			
		||||
GENERATED_FILES += config-target.h
 | 
			
		||||
Makefile: $(GENERATED_FILES)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,7 +8,7 @@ obj-$(CONFIG_KVM) += kvm.o
 | 
			
		|||
feat-src = $(SRC_PATH)/target/$(TARGET_BASE_ARCH)/
 | 
			
		||||
feat-dst = $(BUILD_DIR)/$(TARGET_DIR)
 | 
			
		||||
ifneq ($(MAKECMDGOALS),clean)
 | 
			
		||||
GENERATED_HEADERS += $(feat-dst)gen-features.h
 | 
			
		||||
GENERATED_FILES += $(feat-dst)gen-features.h
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
$(feat-dst)gen-features.h: $(feat-dst)gen-features.h-timestamp
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -494,7 +494,7 @@ qapi-schema += unknown-expr-key.json
 | 
			
		|||
 | 
			
		||||
check-qapi-schema-y := $(addprefix tests/qapi-schema/, $(qapi-schema))
 | 
			
		||||
 | 
			
		||||
GENERATED_HEADERS += tests/test-qapi-types.h tests/test-qapi-visit.h \
 | 
			
		||||
GENERATED_FILES += tests/test-qapi-types.h tests/test-qapi-visit.h \
 | 
			
		||||
	tests/test-qmp-commands.h tests/test-qapi-event.h \
 | 
			
		||||
	tests/test-qmp-introspect.h
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,13 +1,5 @@
 | 
			
		|||
# -*- mode: makefile -*-
 | 
			
		||||
 | 
			
		||||
######################################################################
 | 
			
		||||
# tracetool source files
 | 
			
		||||
# Every rule that invokes tracetool must depend on this so code is regenerated
 | 
			
		||||
# if tracetool itself changes.
 | 
			
		||||
 | 
			
		||||
tracetool-y = $(SRC_PATH)/scripts/tracetool.py
 | 
			
		||||
tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py")
 | 
			
		||||
 | 
			
		||||
$(BUILD_DIR)/trace-events-all: $(trace-events-files)
 | 
			
		||||
	$(call quiet-command,cat $^ > $@)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue