From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvceR-000360-56 for qemu-devel@nongnu.org; Thu, 09 Feb 2012 17:39:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvceM-0006XV-Tf for qemu-devel@nongnu.org; Thu, 09 Feb 2012 17:39:39 -0500 Received: from mail-qy0-f173.google.com ([209.85.216.173]:37528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvceM-0006XK-Pv for qemu-devel@nongnu.org; Thu, 09 Feb 2012 17:39:34 -0500 Received: by qcsc20 with SMTP id c20so1399365qcs.4 for ; Thu, 09 Feb 2012 14:39:34 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1328647446-5452-2-git-send-email-meadori@codesourcery.com> References: <1328647446-5452-1-git-send-email-meadori@codesourcery.com> <1328647446-5452-2-git-send-email-meadori@codesourcery.com> Date: Thu, 9 Feb 2012 22:39:33 +0000 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v1 1/1] ./configure: add option for disabling VirtFS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Meador Inge Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, aneesh.kumar@linux.vnet.ibm.com On 7 February 2012 20:44, Meador Inge wrote: > Signed-off-by: Meador Inge > --- > =C2=A0Makefile =C2=A0| =C2=A0 =C2=A04 ++++ > =C2=A0configure | =C2=A0 16 +++++++++++++--- > =C2=A02 files changed, 17 insertions(+), 3 deletions(-) > > diff --git a/Makefile b/Makefile > index 47acf3d..030619c 100644 > --- a/Makefile > +++ b/Makefile > @@ -40,7 +40,9 @@ HELPERS-$(CONFIG_LINUX) =3D qemu-bridge-helper$(EXESUF) > > =C2=A0ifdef BUILD_DOCS > =C2=A0DOCS=3Dqemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QM= P/qmp-commands.txt > +ifdef CONFIG_VIRTFS > =C2=A0DOCS+=3Dfsdev/virtfs-proxy-helper.1 > +endif > =C2=A0else > =C2=A0DOCS=3D > =C2=A0endif > @@ -162,8 +164,10 @@ qemu-io$(EXESUF): qemu-io.o cmd.o $(tools-obj-y) $(b= lock-obj-y) > > =C2=A0qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o > > +ifdef CONFIG_VIRTFS > =C2=A0fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsd= ev/virtio-9p-marshal.o oslib-posix.o $(trace-obj-y) > =C2=A0fsdev/virtfs-proxy-helper$(EXESUF): LIBS +=3D -lcap > +endif We don't need to make this conditional, we will just not put the proxy-helper into TOOLS if we don't want to build it and this dependency will be ignored. > =C2=A0qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx > =C2=A0 =C2=A0 =C2=A0 =C2=A0$(call quiet-command,sh $(SRC_PATH)/scripts/hx= tool -h < $< > $@," =C2=A0GEN =C2=A0 $@") > diff --git a/configure b/configure > index 763db24..081d720 100755 > --- a/configure > +++ b/configure > @@ -121,6 +121,7 @@ docs=3D"" > =C2=A0fdt=3D"" > =C2=A0nptl=3D"" > =C2=A0sdl=3D"" > +virtfs=3D"yes" > =C2=A0vnc=3D"yes" > =C2=A0sparse=3D"no" > =C2=A0uuid=3D"" > @@ -586,6 +587,10 @@ for opt do > =C2=A0 ;; > =C2=A0 --enable-sdl) sdl=3D"yes" > =C2=A0 ;; > + =C2=A0--disable-virtfs) virtfs=3D"no" > + =C2=A0;; > + =C2=A0--enable-virtfs) virtfs=3D"yes" > + =C2=A0;; > =C2=A0 --disable-vnc) vnc=3D"no" > =C2=A0 ;; > =C2=A0 --enable-vnc) vnc=3D"yes" This should be handled the same way as a number of other optional components : default is "" meaning 'probe and use if possible'. So you end up with a test like: if test "$virtfs" !=3D no; then if test "$cap" =3D yes && test "$linux" =3D yes && test "$attr" =3D yes;= then virtfs=3Dyes tools=3D"$tools fsdev/virtfs-proxy-helper\$(EXESUF)" else if test "$virtfs" =3D yes; then feature_not_found "virtfs" fi fi fi and then later just if test "$virtfs" =3D "yes" ; then echo "CONFIG_VIRTFS=3Dy" >> $config_host_mak fi -- PMM