From patchwork Wed Mar 23 17:20:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 64247 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp155698lbc; Wed, 23 Mar 2016 10:24:02 -0700 (PDT) X-Received: by 10.140.195.203 with SMTP id q194mr5455858qha.45.1458753842134; Wed, 23 Mar 2016 10:24:02 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id n18si2941580qhc.35.2016.03.23.10.24.01 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 23 Mar 2016 10:24:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:45163 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aimVl-0000jT-JG for patch@linaro.org; Wed, 23 Mar 2016 13:24:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aimT0-0004Io-E2 for qemu-devel@nongnu.org; Wed, 23 Mar 2016 13:21:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aimSz-0006Td-DZ for qemu-devel@nongnu.org; Wed, 23 Mar 2016 13:21:10 -0400 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:34716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aimSz-0006T2-7H for qemu-devel@nongnu.org; Wed, 23 Mar 2016 13:21:09 -0400 Received: by mail-wm0-x236.google.com with SMTP id p65so242757749wmp.1 for ; Wed, 23 Mar 2016 10:21:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uGOiqZWbe7vMFTUdqZ+gi0FDkZefVSMvxYG+iclv/yk=; b=ZTmEptlJDe3Rru5qFFdwoPEUPYP7/+cDYJYwaVgtLohEFmq39kNY0TdHyFqwR2fmlI HZ0MpDgG//jk1wKMAqMi/INZdfuXGOx6CcM0A1L92Ri7nXifiSgIzwecIaKworAD/xpC qyyyuqHZgfxxpzTjECJ4X3GjJL6mmZ7GL2SC0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uGOiqZWbe7vMFTUdqZ+gi0FDkZefVSMvxYG+iclv/yk=; b=DCo8SHnmq+sjCBopkDc7VXJtVwQ9BAupJmxmhCUGui3reztBtMIlFohhM6Z6d0iRQ6 AgSW5ZhC7cax0Sc4zBKZs2JZGjqCG6IFsvYLpsykAF32aXOx5YjR/SuiRpXjHkZ3l+BC RaoIyNcqSy13CokrONnq8m6meg0yzYZICeObppRar7gL4mW3MVolTZAvIylN+uqyX3dy KBYCzmhJwrRFrsZ0lFtUnyFm/k5Lw4+qQLO9jlsQnlD62PHFP5CKbDYN3VtgnCI6wFIn xFW3bCS4wINdihj8gqEiqzHnprAYrm6hfhKCZfU6uwV5YUBRoPZAW+s6MeEMshWVpbyK ajJQ== X-Gm-Message-State: AD7BkJJB1OyebbpcMVgjM37pUlFOFgYXFl9zfFc4OgrkL1kXjNBk8YaI9ACynzjrXFR/Th74 X-Received: by 10.28.30.215 with SMTP id e206mr26018695wme.25.1458753668656; Wed, 23 Mar 2016 10:21:08 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id y3sm23193472wmy.17.2016.03.23.10.21.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Mar 2016 10:21:06 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id BA79D3E051C; Wed, 23 Mar 2016 17:21:02 +0000 (GMT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Wed, 23 Mar 2016 17:20:56 +0000 Message-Id: <1458753657-21664-5-git-send-email-alex.bennee@linaro.org> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1458753657-21664-1-git-send-email-alex.bennee@linaro.org> References: <1458753657-21664-1-git-send-email-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::236 Cc: peter.maydell@linaro.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , david@gibson.dropbear.id.au Subject: [Qemu-devel] [PATCH v2 4/5] ./configure: accept stems to match a range of 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This is useful if you want to build all targets of a given architecture or type. A simple submatch to an real target will add it to the list. Signed-off-by: Alex Bennée --- configure | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) -- 2.7.3 diff --git a/configure b/configure index b88d0db..ebf8a42 100755 --- a/configure +++ b/configure @@ -1246,7 +1246,8 @@ Standard options: --target-list=LIST set target list (default: build everything) $(echo Available targets: $default_target_list | \ fold -s -w 53 | sed -e 's/^/ /') - + LIST can contain stems to match sets of targets + (e.g. softmmu will match all softmmu targets) Advanced options (experts only): --source-path=PATH path of source code [$source_path] --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix] @@ -1639,15 +1640,29 @@ fi # Check that we recognised the target name; this allows a more # friendly error message than if we let it fall through. +final_target_list="" for target in $target_list; do case " $default_target_list " in *" $target "*) + final_target_list="$target $final_target_list" ;; *) - error_exit "Unknown target name '$target'" + # Maybe we can match to range of targets? + exp="no" + for match in $default_target_list; do + if test "${match#*$target}" != "$match" ; then + final_target_list="$match $final_target_list" + exp="yes" + fi + done + if test "$exp" = "no"; then + error_exit "Unknown target name '$target'" + fi ;; esac done +target_list=$final_target_list + # see if system emulation was really requested case " $target_list " in