From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFpYG-0004B8-OD for qemu-devel@nongnu.org; Fri, 29 Apr 2011 11:24:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QFpYB-0006WE-V3 for qemu-devel@nongnu.org; Fri, 29 Apr 2011 11:24:16 -0400 Received: from mout.perfora.net ([74.208.4.194]:50430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFpYB-0006WA-Pl for qemu-devel@nongnu.org; Fri, 29 Apr 2011 11:24:11 -0400 From: Michael Roth Date: Fri, 29 Apr 2011 10:22:01 -0500 Message-Id: <1304090522-5861-9-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1304090522-5861-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1304090522-5861-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 8/9] qapi: Makefile, build test-visiter with generated test code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@linux.vnet.ibm.com, agl@linux.vnet.ibm.com, mdroth@linux.vnet.ibm.com 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 --- 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