[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 19/26] build-sys: move qapi variables in qapi.mak
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH 19/26] build-sys: move qapi variables in qapi.mak |
Date: |
Thu, 27 Jul 2017 17:41:19 +0200 |
Signed-off-by: Marc-André Lureau <address@hidden>
---
Makefile | 43 +++++++++++++++++--------------------------
qapi.mak | 14 ++++++++++++++
2 files changed, 31 insertions(+), 26 deletions(-)
create mode 100644 qapi.mak
diff --git a/Makefile b/Makefile
index ef721480eb..8cd30fd88e 100644
--- a/Makefile
+++ b/Makefile
@@ -50,6 +50,7 @@ endif
endif
include $(SRC_PATH)/rules.mak
+include $(SRC_PATH)/qapi.mak
GENERATED_FILES = qemu-version.h config-host.h qemu-options.def
GENERATED_FILES += qmp-commands.h qapi-types.h qapi-visit.h qapi-event.h
@@ -390,56 +391,46 @@ qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
$(SRC_PATH)/scripts/hxtool
qemu-ga$(EXESUF): LIBS = $(LIBS_QGA)
qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated
-gen-out-type = $(subst .,-,$(suffix $@))
-
-qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py
-
qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h :\
-$(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
+$(SRC_PATH)/qga/qapi-schema.json $(qapi-types-py)
$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py \
- $(gen-out-type) -o qga/qapi-generated -p "qga-" $<, \
+ $(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 $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
+$(SRC_PATH)/qga/qapi-schema.json $(qapi-visit-py)
$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py \
- $(gen-out-type) -o qga/qapi-generated -p "qga-" $<, \
+ $(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 $(SRC_PATH)/scripts/qapi-commands.py
$(qapi-py)
+$(SRC_PATH)/qga/qapi-schema.json $(qapi-commands-py)
$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py \
- $(gen-out-type) -o qga/qapi-generated -p "qga-" $<, \
+ $(qapi-gen-type) -o qga/qapi-generated -p "qga-" $<, \
"GEN","$@")
-qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \
- $(SRC_PATH)/qapi/block.json $(SRC_PATH)/qapi/block-core.json \
- $(SRC_PATH)/qapi/event.json $(SRC_PATH)/qapi/introspect.json \
- $(SRC_PATH)/qapi/crypto.json $(SRC_PATH)/qapi/rocker.json \
- $(SRC_PATH)/qapi/trace.json
-
qapi-types.c qapi-types.h :\
-$(qapi-modules) $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
+$(qapi-modules) $(qapi-types-py)
$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py \
- $(gen-out-type) -o "." -b $<, \
+ $(qapi-gen-type) -o "." -b $<, \
"GEN","$@")
qapi-visit.c qapi-visit.h :\
-$(qapi-modules) $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
+$(qapi-modules) $(qapi-visit-py)
$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py \
- $(gen-out-type) -o "." -b $<, \
+ $(qapi-gen-type) -o "." -b $<, \
"GEN","$@")
qapi-event.c qapi-event.h :\
-$(qapi-modules) $(SRC_PATH)/scripts/qapi-event.py $(qapi-py)
+$(qapi-modules) $(qapi-event-py)
$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-event.py \
- $(gen-out-type) -o "." $<, \
+ $(qapi-gen-type) -o "." $<, \
"GEN","$@")
qmp-commands.h qmp-marshal.c :\
-$(qapi-modules) $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
+$(qapi-modules) $(qapi-commands-py)
$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py \
- $(gen-out-type) -o "." $<, \
+ $(qapi-gen-type) -o "." $<, \
"GEN","$@")
qmp-introspect.h qmp-introspect.c :\
-$(qapi-modules) $(SRC_PATH)/scripts/qapi-introspect.py $(qapi-py)
+$(qapi-modules) $(qapi-introspect-py)
$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-introspect.py \
- $(gen-out-type) -o "." $<, \
+ $(qapi-gen-type) -o "." $<, \
"GEN","$@")
QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h
qga-qmp-commands.h)
diff --git a/qapi.mak b/qapi.mak
new file mode 100644
index 0000000000..70196127d9
--- /dev/null
+++ b/qapi.mak
@@ -0,0 +1,14 @@
+qapi-gen-type = $(subst .,-,$(suffix $@))
+
+qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \
+ $(SRC_PATH)/qapi/block.json $(SRC_PATH)/qapi/block-core.json \
+ $(SRC_PATH)/qapi/event.json $(SRC_PATH)/qapi/introspect.json \
+ $(SRC_PATH)/qapi/crypto.json $(SRC_PATH)/qapi/rocker.json \
+ $(SRC_PATH)/qapi/trace.json
+
+qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py
+qapi-types-py = $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
+qapi-visit-py = $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
+qapi-commands-py = $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
+qapi-introspect-py = $(SRC_PATH)/scripts/qapi-introspect.py $(qapi-py)
+
--
2.14.0.rc0.1.g40ca67566
- [Qemu-devel] [PATCH 00/26] qapi: add #if pre-processor conditions to generated code, Marc-André Lureau, 2017/07/27
- [Qemu-devel] [PATCH 03/26] qboject: add literal qobject type, Marc-André Lureau, 2017/07/27
- [Qemu-devel] [PATCH 04/26] qapi: generate a literal qobject for introspection, Marc-André Lureau, 2017/07/27
- [Qemu-devel] [PATCH 02/26] qobject: replace dump_qobject() by qobject_to_string(), Marc-André Lureau, 2017/07/27
- [Qemu-devel] [PATCH 05/26] visitor: pass size of strings array to enum visitor, Marc-André Lureau, 2017/07/27
- [Qemu-devel] [PATCH 20/26] tests/qmp-test: add query-qmp-schema test, Marc-André Lureau, 2017/07/27
- [Qemu-devel] [PATCH 22/26] qapi: make rtc-reset-reinjection depend on TARGET_I386, Marc-André Lureau, 2017/07/27
- [Qemu-devel] [PATCH 19/26] build-sys: move qapi variables in qapi.mak,
Marc-André Lureau <=
- [Qemu-devel] [PATCH 13/26] qapi2texi: add 'If:' condition to enum values, Marc-André Lureau, 2017/07/27
- [Qemu-devel] [PATCH 23/26] qapi: make s390 commands depend on TARGET_S390X, Marc-André Lureau, 2017/07/27
- [Qemu-devel] [PATCH 16/26] qapi: add conditions to VNC type/commands/events on the schema, Marc-André Lureau, 2017/07/27
- [Qemu-devel] [PATCH 08/26] qapi: add 'if' condition on enum member values, Marc-André Lureau, 2017/07/27
- [Qemu-devel] [PATCH 24/26] qapi: make query-gic-capabilities depend on TARGET_ARM, Marc-André Lureau, 2017/07/27
- [Qemu-devel] [PATCH 15/26] qapi2texi: add condition to variants, Marc-André Lureau, 2017/07/27
- [Qemu-devel] [PATCH 12/26] qapi2texi: add 'If:' section to generated documentation, Marc-André Lureau, 2017/07/27
- [Qemu-devel] [PATCH 21/26] build-sys: make qemu qapi objects per-target, Marc-André Lureau, 2017/07/27
- [Qemu-devel] [PATCH 14/26] qapi2texi: add 'If:' condition to struct members, Marc-André Lureau, 2017/07/27