From: Stefan Weil <sw@weilnetz.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Add ability to build without any targets enabled
Date: Fri, 31 Aug 2012 19:29:26 +0200 [thread overview]
Message-ID: <5040F476.4050001@weilnetz.de> (raw)
In-Reply-To: <CAFEAcA9ZfcKZFapEXBU_Gf-2St5TsKt4D2Rmh7Vz0i7Rbr1ZZA@mail.gmail.com>
Am 31.08.2012 19:15, schrieb Peter Maydell:
> On 31 August 2012 18:06, Daniel P. Berrange<berrange@redhat.com> wrote:
>> From: "Daniel P. Berrange"<berrange@redhat.com>
>>
>> The qemu-img, qemu-nbd and qemu-io tools are quite useful in their
>> own right. eg LXC can use qemu-img and qemu-nbd to support running
>> of containers with qcow2 images. As such it is reasonable to allow
>> building these tools, without enabling any QEMU targets. This change
>> does two things:
>>
>> - Allows passing an empty string to the --target-list arg
>> to disable all targets
>> - Adds --enable-tools/--disable-tools args to enable/disable
>> building of qemu-img, qemu-nbd and qemu-io independantly
>> of whether any softmmu target is disabled. The builds
>> default to enabled at all times.
>
> Feels to me like these should be separate patches.
>
>> With this you can do
>>
>> ./configure --target-list=
>>
>> and get a build that only includes the basic tools
>>
>> Signed-off-by: Daniel P. Berrange<berrange@redhat.com>
>> ---
>> configure | 38 ++++++++++++++++++++++++++------------
>> 1 file changed, 26 insertions(+), 12 deletions(-)
>>
>> diff --git a/configure b/configure
>> index d97fd81..bbde154 100755
>> --- a/configure
>> +++ b/configure
>> @@ -128,6 +128,7 @@ libs_qga=""
>> debug_info="yes"
>>
>> target_list=""
>> +without_targets=0
>>
>> # Default value for a variable defining feature "foo".
>> # * foo="no" feature will only be used if --enable-foo arg is given
>> @@ -216,6 +217,7 @@ usb_redir=""
>> opengl=""
>> zlib="yes"
>> guest_agent="yes"
>> +want_tools="yes"
>> libiscsi=""
>> coroutine=""
>> seccomp=""
>> @@ -614,7 +616,12 @@ for opt do
>> ;;
>> --cpu=*)
>> ;;
>> - --target-list=*) target_list="$optarg"
>> + --target-list=*)
>> + if test -z "$optarg" ; then
>> + without_targets=1
>> + else
>> + target_list="$optarg"
>> + fi
>> ;;
>
> I think the code ends up a bit simpler if you start with
> target_list=DEFAULT
> and use that as the indicator of 'use default list' rather
> than the empty string. However that does add the 'undocumented
> feature' that '--target-list=DEFAULT' becomes valid...
>
> -- PMM
An undefined target_list might be a better indicator
and does not add undocumented features.
I appreciate the possibility of default builds without tools:
they save time when running 'git bisect' or in cross builds
when the tools are not needed.
My private QEMU has this feature since several years, but
uses an approach which differs from this patch: there are always
Makefile targets 'doc' and 'tools'. By default, 'all' includes
'doc' and 'tools', but they can be disabled using configure
options (--disable-docs, --disable-tools). Even when they
are disabled, it is possible to run 'make doc' or 'make tools'.
Regards,
Stefan W.
prev parent reply other threads:[~2012-08-31 17:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-31 17:06 [Qemu-devel] [PATCH] Add ability to build without any targets enabled Daniel P. Berrange
2012-08-31 17:15 ` Peter Maydell
2012-08-31 17:29 ` Stefan Weil [this message]
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=5040F476.4050001@weilnetz.de \
--to=sw@weilnetz.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).