Received: from eggs.gnu.org ([2001:4830:134:3::10]:40654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ba4AY-0005EJ-1B for qemu-devel@nongnu.org; Wed, 17 Aug 2016 12:58:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ba4AR-0002Ns-Ko for qemu-devel@nongnu.org; Wed, 17 Aug 2016 12:58:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ba4AR-0002Nm-Ck for qemu-devel@nongnu.org; Wed, 17 Aug 2016 12:58:15 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DF9BB3B72D for ; Wed, 17 Aug 2016 16:58:14 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 17 Aug 2016 20:57:41 +0400 Message-Id: <20160817165757.23486-5-marcandre.lureau@redhat.com> In-Reply-To: <20160817165757.23486-1-marcandre.lureau@redhat.com> References: <20160817165757.23486-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v5 04/20] build-sys: use config headers to generate qapi List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: eblake@redhat.com, armbru@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Configure the marshaller, events and introspection with config host and target headers. Keep the types, visitors, and command header generic since it will only use what is actually needed, but needs all declarations to be compatible with the various targets. Signed-off-by: Marc-Andr=C3=A9 Lureau --- Makefile | 15 +++++++++------ Makefile.target | 12 +++++++----- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 83d27fb..f83b208 100644 --- a/Makefile +++ b/Makefile @@ -267,20 +267,23 @@ qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(SRC= _PATH)/scripts/hxtool qemu-ga$(EXESUF): LIBS =3D $(LIBS_QGA) qemu-ga$(EXESUF): QEMU_CFLAGS +=3D -I qga/qapi-generated =20 +qapi-hconfig =3D config-host.h +qapi-flags =3D $(patsubst %,-f %,$(qapi-hconfig)) + qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h = :\ -$(SRC_PATH)/qga/qapi-schema.json $(qapi-types-py) +$(SRC_PATH)/qga/qapi-schema.json $(qapi-types-py) $(qapi-hconfig) $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py \ - $(qapi-gen-type) -o qga/qapi-generated -p "qga-" $<, \ + $(qapi-flags) $(qapi-gen-type) -o qga/qapi-generated -p "qga-" $<, \ " GEN $@") qga/qapi-generated/qga-qapi-visit.c qga/qapi-generated/qga-qapi-visit.h = :\ -$(SRC_PATH)/qga/qapi-schema.json $(qapi-visit-py) +$(SRC_PATH)/qga/qapi-schema.json $(qapi-visit-py) $(qapi-hconfig) $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py \ - $(qapi-gen-type) -o qga/qapi-generated -p "qga-" $<, \ + $(qapi-flags) $(qapi-gen-type) -o qga/qapi-generated -p "qga-" $<, \ " GEN $@") qga/qapi-generated/qga-qmp-commands.h qga/qapi-generated/qga-qmp-marshal= .c :\ -$(SRC_PATH)/qga/qapi-schema.json $(qapi-commands-py) +$(SRC_PATH)/qga/qapi-schema.json $(qapi-commands-py) $(qapi-hconfig) $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py \ - $(qapi-gen-type) -o qga/qapi-generated -p "qga-" $<, \ + $(qapi-flags) $(qapi-gen-type) -o qga/qapi-generated -p "qga-" $<, \ " GEN $@") =20 qapi-types.c qapi-types.h :\ diff --git a/Makefile.target b/Makefile.target index 6b672eb..c6c20bf 100644 --- a/Makefile.target +++ b/Makefile.target @@ -160,23 +160,25 @@ endif GENERATED_HEADERS +=3D hmp-commands.h hmp-commands-info.h qmp-commands-o= ld.h GENERATED_HEADERS +=3D qmp-introspect.h GENERATED_SOURCES +=3D qmp-introspect.c qmp-marshal.c qapi-event.c +qapi-hconfig =3D ../config-host.h config-target.h +qapi-flags =3D $(patsubst %,-f %,$(qapi-hconfig)) =20 qmp-marshal.c :\ -$(qapi-modules) $(qapi-commands-py) +$(qapi-modules) $(qapi-commands-py) $(qapi-hconfig) $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py \ - $(qapi-gen-type) -o "." -m $<, \ + $(qapi-flags) $(qapi-gen-type) -o "." -m $<, \ " GEN $(TARGET_DIR)$@") =20 qapi-event.c :\ $(qapi-modules) $(qapi-event-py) $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-event.py \ - $(qapi-gen-type) -o "." $<, \ + $(qapi-flags) $(qapi-gen-type) -o "." $<, \ " GEN $@") =20 qmp-introspect.h qmp-introspect.c :\ -$(qapi-modules) $(qapi-introspect-py) +$(qapi-modules) $(qapi-introspect-py) $(qapi-hconfig) $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-introspect.py \ - $(qapi-gen-type) -o "." $<, \ + $(qapi-flags) $(qapi-gen-type) -o "." $<, \ " GEN $(TARGET_DIR)$@") =20 obj-y +=3D qmp-marshal.o qmp-introspect.o qapi-event.o --=20 2.9.0