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 <mdr...@linux.vnet.ibm.com> --- 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