qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	John Rigby <john.rigby@linaro.org>,
	patches@linaro.org
Subject: [Qemu-devel] [PATCH 2/2] configure: Report unknown target names more helpfully
Date: Mon, 20 May 2013 16:16:16 +0100	[thread overview]
Message-ID: <1369062976-301-3-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1369062976-301-1-git-send-email-peter.maydell@linaro.org>

If the user specifies a target list themselves, check each entry
to make sure it's a target we recognise. This allows us to print
a helpful error message, rather than falling through (where we
would probably eventually end up hitting the uninformative
"ERROR: Unsupported target CPU").

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 configure |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/configure b/configure
index e0fa143..4b74a94 100755
--- a/configure
+++ b/configure
@@ -1338,6 +1338,19 @@ if test -z "${target_list+xxx}" ; then
 else
     target_list=`echo "$target_list" | sed -e 's/,/ /g'`
 fi
+
+# Check that we recognised the target name; this allows a more
+# friendly error message than if we let it fall through.
+for target in $target_list; do
+    case " $default_target_list " in
+        *" $target "*)
+            ;;
+        *)
+            error_exit "Unknown target name '$target'"
+            ;;
+    esac
+done
+
 # see if system emulation was really requested
 case " $target_list " in
   *"-softmmu "*) softmmu=yes
-- 
1.7.9.5

  parent reply	other threads:[~2013-05-20 15:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-20 15:16 [Qemu-devel] [PATCH 0/2] configure: improve handling of target lists Peter Maydell
2013-05-20 15:16 ` [Qemu-devel] [PATCH 1/2] configure: Autogenerate default target list Peter Maydell
2013-05-20 21:11   ` Andreas Färber
2013-05-20 23:09     ` Peter Maydell
2013-06-04 15:27       ` Ed Maste
2013-06-04 16:04         ` Peter Maydell
2013-06-04 16:33           ` Ed Maste
2013-05-20 15:16 ` Peter Maydell [this message]
2013-06-03 17:17 ` [Qemu-devel] [PATCH 0/2] configure: improve handling of target lists Peter Maydell
2013-06-10 21:48 ` Anthony Liguori

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=1369062976-301-3-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=aliguori@us.ibm.com \
    --cc=john.rigby@linaro.org \
    --cc=patches@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).