From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ql3bz-00076i-PB for qemu-devel@nongnu.org; Sun, 24 Jul 2011 14:41:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ql3by-0002Bo-9c for qemu-devel@nongnu.org; Sun, 24 Jul 2011 14:41:11 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:46731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ql3by-0002BY-3d for qemu-devel@nongnu.org; Sun, 24 Jul 2011 14:41:10 -0400 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by e32.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p6OHV9bn022291 for ; Sun, 24 Jul 2011 11:31:09 -0600 Received: from d03av06.boulder.ibm.com (d03av06.boulder.ibm.com [9.17.195.245]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p6OIdmSO183004 for ; Sun, 24 Jul 2011 12:39:48 -0600 Received: from d03av06.boulder.ibm.com (loopback [127.0.0.1]) by d03av06.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p6OIjLqW029112 for ; Sun, 24 Jul 2011 12:45:21 -0600 Message-ID: <4E2C66EB.7000400@linux.vnet.ibm.com> Date: Sun, 24 Jul 2011 13:39:39 -0500 From: Michael Roth MIME-Version: 1.0 References: <1311463002-2438-1-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qapi: check for python, allow path to be specified List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org On 07/24/2011 12:28 PM, Blue Swirl wrote: > On Sun, Jul 24, 2011 at 2:16 AM, Michael Roth wrote: >> QAPI requires python to generate code. Check for python during >> configuration and allow python to be specified manually. >> >> Signed-off-by: Michael Roth >> --- >> Makefile | 12 ++++++------ >> configure | 13 +++++++++++++ >> 2 files changed, 19 insertions(+), 6 deletions(-) >> >> diff --git a/Makefile b/Makefile >> index f3a03ad..daa3aa0 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -168,22 +168,22 @@ test-visitor.o test-qmp-commands.o qemu-ga$(EXESUF): QEMU_CFLAGS += -I $(qapi-di >> >> $(qapi-dir)/test-qapi-types.c: $(qapi-dir)/test-qapi-types.h >> $(qapi-dir)/test-qapi-types.h: $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-types.py >> - $(call quiet-command,python $(SRC_PATH)/scripts/qapi-types.py -o "$(qapi-dir)" -p "test-"< $<, " GEN $@") >> + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py -o "$(qapi-dir)" -p "test-"< $<, " GEN $@") >> $(qapi-dir)/test-qapi-visit.c: $(qapi-dir)/test-qapi-visit.h >> $(qapi-dir)/test-qapi-visit.h: $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-visit.py >> - $(call quiet-command,python $(SRC_PATH)/scripts/qapi-visit.py -o "$(qapi-dir)" -p "test-"< $<, " GEN $@") >> + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py -o "$(qapi-dir)" -p "test-"< $<, " GEN $@") >> $(qapi-dir)/test-qmp-commands.h: $(qapi-dir)/test-qmp-marshal.c >> $(qapi-dir)/test-qmp-marshal.c: $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-commands.py >> - $(call quiet-command,python $(SRC_PATH)/scripts/qapi-commands.py -o "$(qapi-dir)" -p "test-"< $<, " GEN $@") >> + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py -o "$(qapi-dir)" -p "test-"< $<, " GEN $@") >> >> $(qapi-dir)/qga-qapi-types.c: $(qapi-dir)/qga-qapi-types.h >> $(qapi-dir)/qga-qapi-types.h: $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-types.py >> - $(call quiet-command,python $(SRC_PATH)/scripts/qapi-types.py -o "$(qapi-dir)" -p "qga-"< $<, " GEN $@") >> + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py -o "$(qapi-dir)" -p "qga-"< $<, " GEN $@") >> $(qapi-dir)/qga-qapi-visit.c: $(qapi-dir)/qga-qapi-visit.h >> $(qapi-dir)/qga-qapi-visit.h: $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-visit.py >> - $(call quiet-command,python $(SRC_PATH)/scripts/qapi-visit.py -o "$(qapi-dir)" -p "qga-"< $<, " GEN $@") >> + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py -o "$(qapi-dir)" -p "qga-"< $<, " GEN $@") >> $(qapi-dir)/qga-qmp-marshal.c: $(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-commands.py >> - $(call quiet-command,python $(SRC_PATH)/scripts/qapi-commands.py -o "$(qapi-dir)" -p "qga-"< $<, " GEN $@") >> + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py -o "$(qapi-dir)" -p "qga-"< $<, " GEN $@") >> >> test-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y) >> test-visitor: test-visitor.o qfloat.o qint.o qdict.o qstring.o qlist.o qbool.o $(qapi-obj-y) error.o osdep.o qemu-malloc.o $(oslib-obj-y) qjson.o json-streamer.o json-lexer.o json-parser.o qerror.o qemu-error.o qemu-tool.o $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o >> diff --git a/configure b/configure >> index 6911c3b..c0cb979 100755 >> --- a/configure >> +++ b/configure >> @@ -225,6 +225,7 @@ strip="${cross_prefix}${STRIP-strip}" >> windres="${cross_prefix}${WINDRES-windres}" >> pkg_config="${cross_prefix}${PKG_CONFIG-pkg-config}" >> sdl_config="${cross_prefix}${SDL_CONFIG-sdl-config}" >> +python_path="${cross_prefix}${PYTHON_PATH-python}" > > In my version, the environment variable is named PYTHON, which I think > is more logical and also consistent with MAKE, STRIP etc. > >> >> # default flags for all hosts >> QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS" >> @@ -748,6 +749,8 @@ for opt do >> ;; >> --enable-usb-redir) usb_redir="yes" >> ;; >> + --python-path=*) python_path="$optarg" > > Also here the other tools are specified with --make and --install. > Thanks, I agree. Not sure what swung me in the other direction.. The v2 I just sent should have all these addressed accordingly.