[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 15/17] Makefile: add qidl-generation of vmstate fiel
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 15/17] Makefile: add qidl-generation of vmstate field descriptions |
Date: |
Mon, 4 Jun 2012 20:00:16 -0500 |
This will rebuild the vmstate descriptions in
$(SRC_DIR)/qidl-generated whenever we do a build where one of the
annotated sources has been modified. As a result, changes will be
reflected in the working tree so we can detect changes and commit
them in cases where the changes are correct/expected.
Signed-off-by: Michael Roth <address@hidden>
---
Makefile.target | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/Makefile.target b/Makefile.target
index 45e4459..0844401 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -22,7 +22,7 @@ QEMU_CFLAGS += -I.. -I$(TARGET_PATH) -DNEED_CPU_H
qidl-dir := $(SRC_PATH)/qidl-generated
qapi-dir := $(BUILD_DIR)/qapi-generated
-QEMU_CFLAGS += -I$(qapi-dir)
+QEMU_CFLAGS += -I$(qapi-dir) -I$(qidl-dir)
include $(SRC_PATH)/Makefile.objs
@@ -74,7 +74,7 @@ else
stap:
endif
-all: $(PROGS) stap
+all: $(PROGS) stap $(QIDL_VMSTATE)
# Dummy command so that make thinks it has done something
@true
@@ -109,6 +109,19 @@ $(QIDL_DEVICE_VISITORS): $(QIDL_DEVICE_VISITOR_SOURCES)
$(QIDL_DEVICES): $(QIDL_DEVICE_VISITORS)
#########################################################
+# QIDL-generated vmstate field descriptions
+QIDL_SOURCES_VMSTATE_SHORT=hw/mc146818rtc_state.h
+QIDL_SOURCES_VMSTATE=$(addprefix $(SRC_PATH)/, $(QIDL_SOURCES_VMSTATE_SHORT))
+QIDL_VMSTATE=$(patsubst %.h,$(qidl-dir)/%_vmstate.h, $(subst _state,, $(notdir
$(QIDL_SOURCES_VMSTATE))))
+
+$(QIDL_VMSTATE) qidl-vmstate: $(QIDL_SOURCES_VMSTATE)
+ mkdir -p $(qidl-dir)
+ for f in $(QIDL_SOURCES_VMSTATE); do \
+ vmstate_filename=$(qidl-dir)/`basename $$(basename $$f .h)
_state`_vmstate.h; \
+ $(PYTHON) $(SRC_PATH)/scripts/qc.py --vmstate < $$f
>$$vmstate_filename; \
+ done
+
+#########################################################
# cpu emulator library
libobj-y = exec.o translate-all.o cpu-exec.o translate.o
libobj-y += tcg/tcg.o tcg/optimize.o
--
1.7.4.1
- [Qemu-devel] [PATCH 06/17] qapi: qapi-visit.py, add gen support for existing types, (continued)
- [Qemu-devel] [PATCH 06/17] qapi: qapi-visit.py, add gen support for existing types, Michael Roth, 2012/06/04
- [Qemu-devel] [PATCH 05/17] qapi: qapi-visit.py, support arrays and complex qapi definitions, Michael Roth, 2012/06/04
- [Qemu-devel] [PATCH 07/17] qapi: add open-coded visitors for QEMUTimer/struct tm types, Michael Roth, 2012/06/04
- [Qemu-devel] [PATCH 08/17] rtc: move RTCState declaration to header, Michael Roth, 2012/06/04
- [Qemu-devel] [PATCH 09/17] rtc: add qc annotations, Michael Roth, 2012/06/04
[Qemu-devel] [PATCH 10/17] Makefile: add infrastructure to incorporate qidl-generated files, Michael Roth, 2012/06/04
[Qemu-devel] [PATCH 15/17] Makefile: add qidl-generation of vmstate field descriptions,
Michael Roth <=
[Qemu-devel] [PATCH 14/17] qidl: add qidl-based generation of vmstate field bindings, Michael Roth, 2012/06/04
[Qemu-devel] [PATCH 11/17] qapi: add qidl-generated qapi schema for rtc, Michael Roth, 2012/06/04
Re: [Qemu-devel] [PATCH 11/17] qapi: add qidl-generated qapi schema for rtc, Avi Kivity, 2012/06/05
[Qemu-devel] [PATCH 12/17] rtc: add a QOM property for accessing device state, Michael Roth, 2012/06/04