aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2013-05-20 16:09:53 +0100
committerPeter Maydell <peter.maydell@linaro.org>2013-05-20 17:22:32 +0100
commitb90d6ea0a1a8080f4951c995dfbf5132abed0b5d (patch)
treeba4278c86402aeea33efa82df2471c1ef9fd497d
parent86ecf84521ba0fd8679b9303d2ffd73b09ecd8f1 (diff)
configure: Report unknown target names more helpfully
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>
-rwxr-xr-xconfigure13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure b/configure
index e0fa143217..4b74a94a24 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