From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZJe9-0001rw-3u for qemu-devel@nongnu.org; Fri, 16 Nov 2012 05:59:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TZJe5-00056W-SA for qemu-devel@nongnu.org; Fri, 16 Nov 2012 05:59:40 -0500 Received: from e28smtp03.in.ibm.com ([122.248.162.3]:55472) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZJe5-00056G-7L for qemu-devel@nongnu.org; Fri, 16 Nov 2012 05:59:37 -0500 Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 16 Nov 2012 16:29:33 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qAGAxTer27131926 for ; Fri, 16 Nov 2012 16:29:30 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qAGGTLcn026843 for ; Fri, 16 Nov 2012 16:29:21 GMT Message-ID: <50A61C73.7000106@linux.vnet.ibm.com> Date: Fri, 16 Nov 2012 18:58:59 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1353060737-4244-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1353060737-4244-4-git-send-email-xiawenc@linux.vnet.ibm.com> <50A61B7A.20906@redhat.com> In-Reply-To: <50A61B7A.20906@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH V9 3/8] Buildsystem move qapi generation to Makefile.objs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, peter.maydell@linaro.org, aliguori@us.ibm.com, stefanha@gmail.com, qemu-devel@nongnu.org, blauwirbel@gmail.com 于 2012-11-16 18:54, Paolo Bonzini 写道: > Il 16/11/2012 11:12, Wenchao Xia ha scritto: >> Sub Makefile may need qapi generated files, so move them to Makefile.objs, >> In this way Makfile.objs control file auto generation. > > No objection in principle, but why are you doing this? Does it fix > anything? > > Paolo > It seems tools or block objects files are depending on qapi files, and libqblock needs tools. So without it out of tree build of libqblock would fail. >> Signed-off-by: Wenchao Xia >> --- >> Makefile | 22 ---------------------- >> Makefile.objs | 22 ++++++++++++++++++++++ >> 2 files changed, 22 insertions(+), 22 deletions(-) >> >> diff --git a/Makefile b/Makefile >> index 8201e80..2cde430 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -207,28 +207,6 @@ ifneq ($(wildcard config-host.mak),) >> include $(SRC_PATH)/tests/Makefile >> endif >> >> -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)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) >> - $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@") >> -qga/qapi-generated/qga-qapi-visit.c qga/qapi-generated/qga-qapi-visit.h :\ >> -$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py) >> - $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@") >> -qga/qapi-generated/qga-qmp-commands.h qga/qapi-generated/qga-qmp-marshal.c :\ >> -$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) >> - $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@") >> - >> -qapi-types.c qapi-types.h :\ >> -$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) >> - $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o "." < $<, " GEN $@") >> -qapi-visit.c qapi-visit.h :\ >> -$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py) >> - $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o "." < $<, " GEN $@") >> -qmp-commands.h qmp-marshal.c :\ >> -$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) >> - $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -m -o "." < $<, " GEN $@") >> - >> QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qmp-commands.h) >> $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN) >> >> diff --git a/Makefile.objs b/Makefile.objs >> index 37be7e2..9da96ea 100644 >> --- a/Makefile.objs >> +++ b/Makefile.objs >> @@ -224,6 +224,28 @@ common-obj-y += qmp.o hmp.o >> >> universal-obj-y += $(qapi-obj-y) >> >> +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)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) >> + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@") >> +qga/qapi-generated/qga-qapi-visit.c qga/qapi-generated/qga-qapi-visit.h :\ >> +$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py) >> + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@") >> +qga/qapi-generated/qga-qmp-commands.h qga/qapi-generated/qga-qmp-marshal.c :\ >> +$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) >> + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@") >> + >> +qapi-types.c qapi-types.h :\ >> +$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) >> + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o "." < $<, " GEN $@") >> +qapi-visit.c qapi-visit.h :\ >> +$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py) >> + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o "." < $<, " GEN $@") >> +qmp-commands.h qmp-marshal.c :\ >> +$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py) >> + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -m -o "." < $<, " GEN $@") >> + >> ###################################################################### >> # guest agent >> >> > -- Best Regards Wenchao Xia