From: Meador Inge <meadori@codesourcery.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org,
aneesh.kumar@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH v1 1/1] ./configure: add option for disabling VirtFS
Date: Thu, 9 Feb 2012 18:49:37 -0600 [thread overview]
Message-ID: <4F3469A1.6090304@codesourcery.com> (raw)
In-Reply-To: <CAFEAcA8OmNhk6DpnQ2g7mnFs7n-joXiW49bMDEkCkFmdpF9hdg@mail.gmail.com>
On 02/09/2012 04:39 PM, Peter Maydell wrote:
> On 7 February 2012 20:44, Meador Inge <meadori@codesourcery.com> wrote:
>> Signed-off-by: Meador Inge <meadori@codesourcery.com>
>> ---
>> Makefile | 4 ++++
>> configure | 16 +++++++++++++---
>> 2 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) = qemu-bridge-helper$(EXESUF)
>>
>> ifdef BUILD_DOCS
>> DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 QMP/qmp-commands.txt
>> +ifdef CONFIG_VIRTFS
>> DOCS+=fsdev/virtfs-proxy-helper.1
>> +endif
>> else
>> DOCS=
>> endif
>> @@ -162,8 +164,10 @@ qemu-io$(EXESUF): qemu-io.o cmd.o $(tools-obj-y) $(block-obj-y)
>>
>> qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o
>>
>> +ifdef CONFIG_VIRTFS
>> fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/virtio-9p-marshal.o oslib-posix.o $(trace-obj-y)
>> fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -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.
Fixed.
>> qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
>> $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@")
>> diff --git a/configure b/configure
>> index 763db24..081d720 100755
>> --- a/configure
>> +++ b/configure
>> @@ -121,6 +121,7 @@ docs=""
>> fdt=""
>> nptl=""
>> sdl=""
>> +virtfs="yes"
>> vnc="yes"
>> sparse="no"
>> uuid=""
>> @@ -586,6 +587,10 @@ for opt do
>> ;;
>> --enable-sdl) sdl="yes"
>> ;;
>> + --disable-virtfs) virtfs="no"
>> + ;;
>> + --enable-virtfs) virtfs="yes"
>> + ;;
>> --disable-vnc) vnc="no"
>> ;;
>> --enable-vnc) vnc="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" != no; then
> if test "$cap" = yes && test "$linux" = yes && test "$attr" = yes; then
> virtfs=yes
> tools="$tools fsdev/virtfs-proxy-helper\$(EXESUF)"
> else
> if test "$virtfs" = yes; then
> feature_not_found "virtfs"
> fi
> fi
> fi
>
> and then later just
> if test "$virtfs" = "yes" ; then
> echo "CONFIG_VIRTFS=y" >> $config_host_mak
> fi
That's much cleaner. Thanks for the review.
v2 patch coming up soon.
--
Meador Inge
CodeSourcery / Mentor Embedded
http://www.mentor.com/embedded-software
next prev parent reply other threads:[~2012-02-10 0:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-07 20:44 [Qemu-devel] [PATCH v1 0/1] Allow the building of VirtFS to be disabled Meador Inge
2012-02-07 20:44 ` [Qemu-devel] [PATCH v1 1/1] ./configure: add option for disabling VirtFS Meador Inge
2012-02-09 22:39 ` Peter Maydell
2012-02-10 0:49 ` Meador Inge [this message]
2012-02-08 8:15 ` [Qemu-devel] [PATCH v1 0/1] Allow the building of VirtFS to be disabled Aneesh Kumar K.V
2012-02-08 10:14 ` Daniel P. Berrange
2012-02-09 22:25 ` Meador Inge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F3469A1.6090304@codesourcery.com \
--to=meadori@codesourcery.com \
--cc=aliguori@us.ibm.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.