qapi: Add includes from qapi/ as dependencies
PATCH 1/1 qapi: Add includes from qapi/ as dependencies
qapi-schema.json has been split into three smaller JSON files in qapi/. Add them as dependencies for the code generation in the Makefile, so changes to them will result in a rebuilt of all QAPI-dependent code.
--- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
Makefile +6 -3
@@ -246,18 +246,21 @@ $(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) $(gen-out-type) -o qga/qapi-generated -p "qga-" -i $<, \ " GEN $@") +qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \ + $(SRC_PATH)/qapi/block.json $(SRC_PATH)/qapi/block-core.json + qapi-types.c qapi-types.h :\ -$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) +$(qapi-modules) $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py \ $(gen-out-type) -o "." -b -i $<, \ " GEN $@") qapi-visit.c qapi-visit.h :\ -$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py) +$(qapi-modules) $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py) $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py \ $(gen-out-type) -o "." -b -i $<, \ " GEN $@") qmp-commands.h qmp-marshal.c :\ -$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) +$(qapi-modules) $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py \ $(gen-out-type) -o "." -m -i $<, \ " GEN $@")
Signature · 1 line
2.0.0
Quoted 41 lines · Max Reitz
qapi-schema.json has been split into three smaller JSON files in qapi/. Add them as dependencies for the code generation in the
Makefile, so changes to them will result in a rebuilt of all QAPI-dependent code.Signed-off-by Max Reitz <[email protected]>--- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)Makefile +6
-3@@ -246,18 +246,21 @@ $(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) $(gen-out-type) -o qga/qapi-generated -p "qga-" -i $<, \ " GEN $@") +qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \ + $(SRC_PATH)/qapi/block.json $(SRC_PATH)/qapi/block-core.json + qapi-types.c qapi-types.h :\ -$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) +$(qapi-modules) $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py \ $(gen-out-type) -o "." -b -i $<, \ " GEN $@") qapi-visit.c qapi-visit.h :\ -$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py) +$(qapi-modules) $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py) $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py \ $(gen-out-type) -o "." -b -i $<, \ " GEN $@") qmp-commands.h qmp-marshal.c :\ -$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) +$(qapi-modules) $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py \ $(gen-out-type) -o "." -m -i $<, \ " GEN $@")Signature · 1 line
2.0.0
Seems correct.
Thanks for fixing this.
Quoted 41 lines · Max Reitz
qapi-schema.json has been split into three smaller JSON files in qapi/. Add them as dependencies for the code generation in the
Makefile, so changes to them will result in a rebuilt of all QAPI-dependent code.Signed-off-by Max Reitz <[email protected]>--- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)Makefile +6
-3@@ -246,18 +246,21 @@ $(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) $(gen-out-type) -o qga/qapi-generated -p "qga-" -i $<, \ " GEN $@") +qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \ + $(SRC_PATH)/qapi/block.json $(SRC_PATH)/qapi/block-core.json + qapi-types.c qapi-types.h :\ -$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) +$(qapi-modules) $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py \ $(gen-out-type) -o "." -b -i $<, \ " GEN $@") qapi-visit.c qapi-visit.h :\ -$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py) +$(qapi-modules) $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py) $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py \ $(gen-out-type) -o "." -b -i $<, \ " GEN $@") qmp-commands.h qmp-marshal.c :\ -$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) +$(qapi-modules) $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py \ $(gen-out-type) -o "." -m -i $<, \ " GEN $@")Signature · 1 line
2.0.0
Quoted 8 lines · Max Reitz
qapi-schema.json has been split into three smaller JSON files in qapi/. Add them as dependencies for the code generation in the
Makefile, so changes to them will result in a rebuilt of all QAPI-dependent code.Signed-off-by Max Reitz <[email protected]>--- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
While looking at this, I realized the MAINTAINERS file may be a bit out of date. We currently have:
QAPI
M: Luiz Capitulino <[email protected]>
M: Michael Roth <[email protected]>
S: Maintained
F: qapi/
T: git git://repo.or.cz/qemu/qmp-unstable.git queue/qmp
QAPI Schema
M: Eric Blake <[email protected]>
M: Luiz Capitulino <[email protected]>
M: Markus Armbruster <[email protected]>
S: Supported
F: qapi-schema.json
T: git git://repo.or.cz/qemu/qmp-unstable.git queue/qmp
which means the recent move of contents out of qapi-schema.json into sub-files under qapi/ inadvertently changed who is the listed maintainer for that content.
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org