Received: from eggs.gnu.org ([140.186.70.92]:43878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCtf0-0007mg-Ft for qemu-devel@nongnu.org; Thu, 21 Apr 2011 09:11:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCtez-0000Nk-4I for qemu-devel@nongnu.org; Thu, 21 Apr 2011 09:11:06 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:49713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCtey-0000NA-On for qemu-devel@nongnu.org; Thu, 21 Apr 2011 09:11:05 -0400 From: Peter Maydell Date: Thu, 21 Apr 2011 14:10:55 +0100 Message-Id: <1303391455-5289-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] =?utf-8?q?=5BPATCH=5D_configure=3A_Support_--target-?= =?utf-8?q?list=3D=3F_to_list_available_targets?= List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@linaro.org Add support for getting configure to print the list of all targets that can be built, via the option '--target-list=?'. Signed-off-by: Peter Maydell --- Yes, you can get the list of targets by running configure without any arguments and then scrolling up to find the target list in the screenful of output, but I think this is a bit more user-friendly. configure | 36 ++++++++++++++++++++++-------------- 1 files changed, 22 insertions(+), 14 deletions(-) diff --git a/configure b/configure index da2da04..15330ea 100755 --- a/configure +++ b/configure @@ -834,7 +834,8 @@ echo " --help print this message" echo " --prefix=PREFIX install in PREFIX [$prefix]" echo " --interp-prefix=PREFIX where to find shared libraries, etc." echo " use %M for cpu name [$interp_prefix]" -echo " --target-list=LIST set target list [$target_list]" +echo " --target-list=LIST set target list (default: build everything)" +echo " use --target-list=? to list available targets" echo "" echo "Advanced options (experts only):" echo " --source-path=PATH path of source code [$source_path]" @@ -1004,11 +1005,11 @@ if test "$solaris" = "yes" ; then fi fi +default_target_list="" -if test -z "$target_list" ; then # these targets are portable - if [ "$softmmu" = "yes" ] ; then - target_list="\ +if [ "$softmmu" = "yes" ] ; then + default_target_list="\ i386-softmmu \ x86_64-softmmu \ arm-softmmu \ @@ -1029,10 +1030,10 @@ sh4eb-softmmu \ sparc-softmmu \ sparc64-softmmu \ " - fi +fi # the following are Linux specific - if [ "$linux_user" = "yes" ] ; then - target_list="${target_list}\ +if [ "$linux_user" = "yes" ] ; then + default_target_list="${default_target_list}\ i386-linux-user \ x86_64-linux-user \ alpha-linux-user \ @@ -1054,20 +1055,27 @@ sparc64-linux-user \ sparc32plus-linux-user \ unicore32-linux-user \ " - fi +fi # the following are Darwin specific - if [ "$darwin_user" = "yes" ] ; then - target_list="$target_list i386-darwin-user ppc-darwin-user " - fi +if [ "$darwin_user" = "yes" ] ; then + default_target_list="$default_target_list i386-darwin-user ppc-darwin-user " +fi # the following are BSD specific - if [ "$bsd_user" = "yes" ] ; then - target_list="${target_list}\ +if [ "$bsd_user" = "yes" ] ; then + default_target_list="${default_target_list}\ i386-bsd-user \ x86_64-bsd-user \ sparc-bsd-user \ sparc64-bsd-user \ " - fi +fi + +if test -z "$target_list" ; then + target_list="$default_target_list" +elif [ "$target_list" = "?" ]; then + echo "Supported targets: " + echo "$default_target_list" + exit 0 else target_list=`echo "$target_list" | sed -e 's/,/ /g'` fi -- 1.7.1