From patchwork Thu Apr 21 13:10:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 1143 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:49:37 -0000 Delivered-To: patches@linaro.org Received: by 10.224.67.148 with SMTP id r20cs163619qai; Thu, 21 Apr 2011 06:10:58 -0700 (PDT) Received: by 10.227.131.208 with SMTP id y16mr8993369wbs.43.1303391458219; Thu, 21 Apr 2011 06:10:58 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk [81.2.115.146]) by mx.google.com with ESMTPS id u2si4228534wbd.23.2011.04.21.06.10.57 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Apr 2011 06:10:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1QCtep-0001Nk-Is; Thu, 21 Apr 2011 14:10:55 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org Subject: [PATCH] =?UTF-8?q?configure:=20Support=20--target-list=3D=3F=20to=20list=20available=20targets?= Date: Thu, 21 Apr 2011 14:10:55 +0100 Message-Id: <1303391455-5289-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 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