[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 8/9] qapi: Makefile, build test-visiter with generat
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 8/9] qapi: Makefile, build test-visiter with generated test code |
Date: |
Fri, 29 Apr 2011 10:22:01 -0500 |
This pulls in test-qapi-visit.c/.h and test-qapi-types.h, which are
generated from qapi-schema-test.json using the --prefix arguments for
the various code generators. Useful for targetted testing of the schema
parser/code generators.
Signed-off-by: Michael Roth <address@hidden>
---
Makefile | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index d510779..d05cf74 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
# Makefile for QEMU.
GENERATED_HEADERS = config-host.h trace.h qemu-options.def qmp.h libqmp.h
qdev-marshal.h
-GENERATED_HEADERS += qapi-types.h qmp-marshal-types.h qcfg-marshal.h
+GENERATED_HEADERS += qapi-types.h qmp-marshal-types.h qcfg-marshal.h
test-qapi-types.h
ifeq ($(TRACE_BACKEND),dtrace)
GENERATED_HEADERS += trace-dtrace.h
endif
@@ -72,7 +72,7 @@ defconfig:
-include config-all-devices.mak
-TOOLS += test-libqmp test-qcfg qsh
+TOOLS += test-libqmp test-qcfg qsh test-visiter
build-all: $(DOCS) $(TOOLS) recurse-all
@@ -109,6 +109,9 @@ QEMU_CFLAGS+=$(CURL_CFLAGS)
QEMU_CFLAGS+=$(GLIB_CFLAGS)
+QEMU_CFLAGS+="-I."
+QEMU_CFLAGS+="-Iqapi"
+
ui/cocoa.o: ui/cocoa.m
ui/sdl.o audio/sdlaudio.o ui/sdl_zoom.o baum.o: QEMU_CFLAGS += $(SDL_CFLAGS)
@@ -252,7 +255,13 @@ test-qcfg: test-qcfg.o $(QCFG_OBJS) qemu-timer-common.o
qapi-obj-y := qapi/qmp-output-visiter.o qapi/qmp-input-visiter.o
-test-visiter: test-visiter.o qfloat.o qint.o qdict.o qstring.o qlist.o qbool.o
$(qapi-obj-y) error.o osdep.o qemu-malloc.o $(oslib-obj-y) qjson.o
json-streamer.o json-lexer.o json-parser.o qerror.o
+test-qapi-types.h: $(SRC_PATH)/qapi-schema-test.json
$(SRC_PATH)/scripts/qapi-types.py
+ $(call quiet-command,python $(SRC_PATH)/scripts/qapi-types.py
--prefix="test-" < $<, " GEN $@")
+test-qapi-visit.c: test-qapi-visit.h
+test-qapi-visit.h: $(SRC_PATH)/qapi-schema-test.json
$(SRC_PATH)/scripts/qapi-visit.py
+ $(call quiet-command,python $(SRC_PATH)/scripts/qapi-visit.py
--prefix="test-" < $<, " GEN $@")
+test-visiter.o: test-qapi-types.h test-qapi-visit.c
+test-visiter: test-visiter.o qfloat.o qint.o qdict.o qstring.o qlist.o qbool.o
$(qapi-obj-y) error.o osdep.o qemu-malloc.o $(oslib-obj-y) qjson.o
json-streamer.o json-lexer.o json-parser.o qerror.o test-qapi-visit.o
qmp-check: build-all
$(call quiet-command, ./test-libqmp, " CHECK $@")
--
1.7.0.4
- [Qemu-devel] [PULL] QAPI code generator fix-ups, Michael Roth, 2011/04/29
- [Qemu-devel] [PATCH 2/9] qapi: input visiter, don't always allocate memory for structs, Michael Roth, 2011/04/29
- [Qemu-devel] [PATCH 3/9] qapi: Fix visiter generator for nested structs/qobjects, Michael Roth, 2011/04/29
- [Qemu-devel] [PATCH 1/9] qapi: Fix type generator for structured type members, Michael Roth, 2011/04/29
- [Qemu-devel] [PATCH 4/9] qapi: some basename/guardname py utility functions, Michael Roth, 2011/04/29
- [Qemu-devel] [PATCH 5/9] qapi: add --prefix option to type generator, Michael Roth, 2011/04/29
- [Qemu-devel] [PATCH 6/9] qapi: add --prefix option for visiter generator, Michael Roth, 2011/04/29
- [Qemu-devel] [PATCH 7/9] qapi: test schema for test-visiter unit tests, Michael Roth, 2011/04/29
- [Qemu-devel] [PATCH 8/9] qapi: Makefile, build test-visiter with generated test code,
Michael Roth <=
- [Qemu-devel] [PATCH 9/9] qapi: test-visiter, pull in gen code, tests for nested structures, Michael Roth, 2011/04/29