qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Alex Bennée" <alex.bennee@linaro.org>
Subject: [Qemu-devel] [PATCH 1/4] ./configure: accept stems to match a range of targets
Date: Fri, 15 Apr 2016 16:56:58 +0100	[thread overview]
Message-ID: <1460735821-12775-2-git-send-email-alex.bennee@linaro.org> (raw)
In-Reply-To: <1460735821-12775-1-git-send-email-alex.bennee@linaro.org>

This is useful if you want to build all targets of a given architecture
or type. A simple submatch to an real target will add it to the list.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 configure | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 5db29f0..1e04a4f 100755
--- a/configure
+++ b/configure
@@ -1247,7 +1247,8 @@ Standard options:
   --target-list=LIST       set target list (default: build everything)
 $(echo Available targets: $default_target_list | \
   fold -s -w 53 | sed -e 's/^/                           /')
-
+                           LIST can contain stems to match sets of targets
+                           (e.g. softmmu will match all softmmu targets)
 Advanced options (experts only):
   --source-path=PATH       path of source code [$source_path]
   --cross-prefix=PREFIX    use PREFIX for compile tools [$cross_prefix]
@@ -1640,15 +1641,29 @@ fi
 
 # Check that we recognised the target name; this allows a more
 # friendly error message than if we let it fall through.
+final_target_list=""
 for target in $target_list; do
     case " $default_target_list " in
         *" $target "*)
+            final_target_list="$target $final_target_list"
             ;;
         *)
-            error_exit "Unknown target name '$target'"
+            # Maybe we can match to range of targets?
+            exp="no"
+            for match in $default_target_list; do
+                if test "${match#*$target}" != "$match" ; then
+                    final_target_list="$match $final_target_list"
+                    exp="yes"
+                fi
+            done
+            if test "$exp" = "no"; then
+                error_exit "Unknown target name '$target'"
+            fi
             ;;
     esac
 done
+target_list=$final_target_list
+
 
 # see if system emulation was really requested
 case " $target_list " in
-- 
2.7.4

  reply	other threads:[~2016-04-15 15:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-15 15:56 [Qemu-devel] [PATCH 0/4] Current Travis queue Alex Bennée
2016-04-15 15:56 ` Alex Bennée [this message]
2016-04-15 15:56 ` [Qemu-devel] [PATCH 2/4] .travis.yml: reduce target list on core configure tweaks Alex Bennée
2016-04-15 16:07   ` Peter Maydell
2016-04-18  9:15     ` Alex Bennée
2016-04-18  9:17       ` Peter Maydell
2016-04-18  9:50         ` Alex Bennée
2016-04-15 15:57 ` [Qemu-devel] [PATCH 3/4] .travis.yml: add libnfs-dev for NFS block driver Alex Bennée
2016-04-15 15:57 ` [Qemu-devel] [PATCH 4/4] .travis.yml: add trusty GCE target Alex Bennée

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=1460735821-12775-2-git-send-email-alex.bennee@linaro.org \
    --to=alex.bennee@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).