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: 92410 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5CCA7B702D for ; Thu, 21 Apr 2011 23:11:22 +1000 (EST) Received: from localhost ([::1]:37667 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCtfC-0007nB-4C for incoming@patchwork.ozlabs.org; Thu, 21 Apr 2011 09:11:18 -0400 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 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 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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 81.2.115.146 Cc: patches@linaro.org Subject: [Qemu-devel] =?utf-8?q?=5BPATCH=5D_configure=3A_Support_--target-?= =?utf-8?q?list=3D=3F_to_list_available_targets?= X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.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