From nobody Mon Feb 9 17:36:53 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576155674; cv=none; d=zohomail.com; s=zohoarc; b=SdPbPVg03u46QXR3TsMB5w6e5InOTs8dSMtV4kBhibrgvb2PWf9EOQnJfyiisXGv+22ERJcXiWlrP2pGnD7ZDRQpxthZ5YToOg+bR1K5YuY9hIGxOZkh8K8ghFz/i+8T+crqSugkJ9rLlVqd8RWAU+mS7Bw9HCf7oy6EAbbcmLM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576155674; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=V9NM3FbIChOvvJW2t/FWXrIIPwk25T+7dF1biBLa1ws=; b=KGGIdd35s07WIT33vojtBQ80rU4NyRMqJbwemVpyhq9YjEmpX3JAdNnNJQyB3DWlIdrqASTHU30XPSUxUgRm2iRpMf2DdKrigbJ0zTQdzzedvJ9q+nTOcrn0LCjZGO21CQz47Bjs3hYuADf4CEK4FWaufyEClfNvQSlxCqm1rzg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576155674150443.91081393125864; Thu, 12 Dec 2019 05:01:14 -0800 (PST) Received: from localhost ([::1]:58946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifO5g-0003SK-5Q for importer@patchew.org; Thu, 12 Dec 2019 08:01:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56166) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifNxr-0002gq-88 for qemu-devel@nongnu.org; Thu, 12 Dec 2019 07:53:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifNxp-0005hx-RO for qemu-devel@nongnu.org; Thu, 12 Dec 2019 07:53:07 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:42359) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ifNxp-0005gM-Jf for qemu-devel@nongnu.org; Thu, 12 Dec 2019 07:53:05 -0500 Received: by mail-wr1-x42e.google.com with SMTP id q6so2581135wro.9 for ; Thu, 12 Dec 2019 04:53:05 -0800 (PST) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id n189sm5193825wme.33.2019.12.12.04.53.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2019 04:53:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=V9NM3FbIChOvvJW2t/FWXrIIPwk25T+7dF1biBLa1ws=; b=upUIWPI9kOWOIA3rUJmV7BUl7gJ30asVYi26sQWcv/rJhDxCsO9DOSOw/ZTcijJaYL TrP8DhvJe3w3rK9bEWRpXFxlywdb38Eum6Kiu0FPPZsF1PrdIszh9B2njtceQDmdXejy 8tMhM90eN71+xF2wDIz7AoGy6pFdk3ZWZuvRZK1AhlPWvAIE/MvtdgrvDUZ+RNER3Fyu BacAnIuYoN+bBdu+6kYCLsaAtGRekBc753wQp2mKLmVWJc0F2CGj4+j1IJVINPEQjEdx 3yJZLevQYvqJKs7amv7tKeV2sj9reI9hz2qC0ygPOo/dIbB6aoqVygsN+CQYwrYvo6BA BurQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=V9NM3FbIChOvvJW2t/FWXrIIPwk25T+7dF1biBLa1ws=; b=mdD5ibbK4eF8uoiAeF0JuYJXNkBgkHMDwCqM67SC2NpL7aoi4jZAhYCdKRpg94pZ3y JscMhfJcJy2nWiGbBbpbxlb5G+1oEC0QR4fp2WCrlHZa8caoXr2jG4E/nPL1FV4N+UaF AazBSHHcRPzz4aEbv+ZoXmZ96ljB9p84i9+0JH31JL+zhptdI4e7yCj1hDZ+EflHjxUq LX1FvQDJ5wxhwHwXMnDkNFF6BTGK/zHVgbRrfUDPIyyAnqD9lJazVZ962IATAi1mb549 3Kibt9aH/xCsnrtBXKLSEfES+fRw2CH7TZW1xrkrwBXY/yNHrzip8zX/lC9Ppls/oMdR 3NbA== X-Gm-Message-State: APjAAAV8+Vlf/rRbl/RtQJWvVG4kreL4IK3YnCMKTA+rlzbMvr875N23 /prdduorZ9PucgQDEOHXPR2JNLQu X-Google-Smtp-Source: APXvYqxa2iToLqHwd09nBgILHNzp2+uKvRIzv3VJcmRTEkaH46jbwB4H6IeIa0j4yILYhHdaAwY/hQ== X-Received: by 2002:a5d:4d0e:: with SMTP id z14mr5993041wrt.208.1576155184325; Thu, 12 Dec 2019 04:53:04 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 006/132] build-sys: add meson submodule Date: Thu, 12 Dec 2019 13:50:50 +0100 Message-Id: <1576155176-2464-7-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1576155176-2464-1-git-send-email-pbonzini@redhat.com> References: <1576155176-2464-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42e X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau --- .gitmodules | 3 +++ configure | 45 +++++++++++++++++++++++++++++++++++++++++--= -- meson | 1 + scripts/archive-source.sh | 3 ++- 4 files changed, 47 insertions(+), 5 deletions(-) create mode 160000 meson diff --git a/.gitmodules b/.gitmodules index c5c4741..67f4ed8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -58,3 +58,6 @@ [submodule "roms/opensbi"] path =3D roms/opensbi url =3D https://git.qemu.org/git/opensbi.git +[submodule "meson"] + path =3D meson + url =3D https://github.com/mesonbuild/meson/ diff --git a/configure b/configure index 2f3e231..0eb3d70 100755 --- a/configure +++ b/configure @@ -171,6 +171,25 @@ path_of() { return 1 } =20 +version_ge () { + local_ver1=3D`echo $1 | tr . ' '` + local_ver2=3D`echo $2 | tr . ' '` + while true; do + set x $local_ver1 + local_first=3D${2-0} + # shift 2 does nothing if there are less than 2 arguments + shift; shift + local_ver1=3D$* + set x $local_ver2 + # the second argument finished, the first must be greater or equal + test $# =3D 1 && return 0 + test $local_first -lt $2 && return 1 + test $local_first -gt $2 && return 0 + shift; shift + local_ver2=3D$* + done +} + have_backend () { echo "$trace_backends" | grep "$1" >/dev/null } @@ -489,7 +508,6 @@ libxml2=3D"" debug_mutex=3D"no" libpmem=3D"" default_devices=3D"yes" -meson=3Dmeson =20 supported_cpu=3D"no" supported_os=3D"no" @@ -1827,9 +1845,28 @@ then error_exit "Python not found. Use --python=3D/path/to/python" fi =20 -if ! has "$meson" -then - error_exit "Meson not found. Use --meson=3D/path/to/meson" +if test -z "$meson" ; then + if has meson && version_ge "$(meson --version)" 0.53.0; then + meson=3Dmeson + elif test -e "${source_path}/.git" && test $git_update =3D 'yes' ; then + meson=3Dgit + elif test -e "${source_path}/meson/meson.py" ; then + meson=3Dinternal + fi +fi + +case "$meson" in + git | internal) + if test "$meson" =3D git; then + git_submodules=3D"${git_submodules} meson" + (cd "${source_path}" && GIT=3D"$git" "./scripts/git-submodule.= sh" update meson) + fi + meson=3D"${source_path}/meson/meson.py" + ;; +esac + +if ! has "$meson" ; then + error_exit "Meson not found. Use --meson=3D/path/to/meson|git|internal" fi meson=3D$(command -v $meson) =20 diff --git a/meson b/meson new file mode 160000 index 0000000..5031f49 --- /dev/null +++ b/meson @@ -0,0 +1 @@ +Subproject commit 5031f4981d4fcf6eb0bc950669a0a77a7df22939 diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index fb5d6b3..c6169db 100755 --- a/scripts/archive-source.sh +++ b/scripts/archive-source.sh @@ -26,7 +26,8 @@ sub_file=3D"${sub_tdir}/submodule.tar" # independent of what the developer currently has initialized # in their checkout, because the build environment is completely # different to the host OS. -submodules=3D"dtc slirp ui/keycodemapdb tests/fp/berkeley-softfloat-3 test= s/fp/berkeley-testfloat-3" +submodules=3D"dtc slirp meson ui/keycodemapdb" +submodules=3D"$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-= testfloat-3" sub_deinit=3D"" =20 function cleanup() { --=20 1.8.3.1