From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeRp8-0007M1-Sy for qemu-devel@nongnu.org; Mon, 20 May 2013 11:16:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UeRp3-0005OY-Ts for qemu-devel@nongnu.org; Mon, 20 May 2013 11:16:30 -0400 Received: from 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:1d0::1]:56946 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeRp3-0005MA-F1 for qemu-devel@nongnu.org; Mon, 20 May 2013 11:16:25 -0400 From: Peter Maydell Date: Mon, 20 May 2013 16:16:16 +0100 Message-Id: <1369062976-301-3-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1369062976-301-1-git-send-email-peter.maydell@linaro.org> References: <1369062976-301-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 2/2] configure: Report unknown target names more helpfully List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , John Rigby , patches@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 --- 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