[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 19/26] build-sys: move qapi variables in qapi.ma
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 19/26] build-sys: move qapi variables in qapi.mak |
Date: |
Thu, 17 Aug 2017 11:19:21 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
We don't move in qapi.mak we move *into* qapi.mak.
While we're talking: use a more common tag, and start the phrase with a
capital letter: "Makefile: Move qapi variables into qapi.mak".
Commit message then still misses the most important part: why?
Marc-André Lureau <address@hidden> writes:
> 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)
> +
.git/rebase-apply/patch:111: new blank line at EOF.
I'm not sure separating the variables from the rules using them is a
good idea. Perhaps I'll understand once you explain *why* you're doing
this.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH 19/26] build-sys: move qapi variables in qapi.mak,
Markus Armbruster <=