From nobody Mon Feb 9 22:38:31 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1580234725741803.1834843273798; Tue, 28 Jan 2020 10:05:25 -0800 (PST) Received: from localhost ([::1]:34864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwVEq-0003g2-0A for importer@patchew.org; Tue, 28 Jan 2020 13:05:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57730) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwV42-0006Cw-Qo for qemu-devel@nongnu.org; Tue, 28 Jan 2020 12:54:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iwV40-0007qZ-Fg for qemu-devel@nongnu.org; Tue, 28 Jan 2020 12:54:13 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:41156) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iwV40-0007oi-6N for qemu-devel@nongnu.org; Tue, 28 Jan 2020 12:54:12 -0500 Received: by mail-wr1-x42c.google.com with SMTP id c9so17098378wrw.8 for ; Tue, 28 Jan 2020 09:54:12 -0800 (PST) Received: from localhost.localdomain (93-36-56-206.ip58.fastwebnet.it. [93.36.56.206]) by smtp.gmail.com with ESMTPSA id o4sm27046968wrx.25.2020.01.28.09.54.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jan 2020 09:54:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=06judu2RvAPY7E+oo72Ez5WIdcyz5/kIJkHMqmuH7Ss=; b=eF6MfdOYmVoXYscF5zKFdwOZ7M/aBPv2/BH1/KqgfDL7yd64lpJUJi3XvYWUjY2pHK PkXFl5Mzsqtfa0DJ7hxg8aPYbaQGiwqPaxvMl+zSc3UGhjYU+alkRXjF5XQ2Ivx/KAb2 DJUnVGTR6Y5vXRaErzBeCPoCxLmfh7H3d9iKIPisdr0m5btLq0bpAoIUfeNoFhcgQbUf 3gtg6xYGzyVEmtNdBWMIwM/gUC0sxbNNnVmS7/XsKckv8+r/aYMW2mM1jzp5kd/KClkj EP+1B8lipbdAALkvpJkB5hff3QhBQCOshG22gk9ytZ1TnCRuLky5bjfSKRq8SsSSeZ0l qcdA== 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:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=06judu2RvAPY7E+oo72Ez5WIdcyz5/kIJkHMqmuH7Ss=; b=KZ5S3Uc0ajoPlGpnWR74eG6ULSCHApLNrw9fgbyBoY/UcRpSbzzQA6VZjOMg5MlUx/ ZYJ+4vTTZpRJtvbf2Nw4QXthNo4FUPqqWh3BGhkt7tTo+YHZYQ471AZb2D5r01QrPI/h mSzpBKZB5WJEzS2BdAA0uhx6flNEPQ+qh//P31Vmrpi1Tu3o3Gee+U9xYkQ1x0x+Vdg5 dnzBiMv/bSxOeiddFJBOLfv5CrvAyNaRmyWV+NBwU8SzQ66wjHBQCPS21NMdQ6ez6YSM /J5TR2Bv5H1lfN9biQYgoCUjis7qMHPQzfqlO9zjOW62SfA6I8fGMJtkDP3mCcBF+kro vTcQ== X-Gm-Message-State: APjAAAXYxSjdwZHLzBn61wvuVnPlSTNWPvZqNez2M6vDFKMULlJ4TJQZ LgJQYyWU+yu9RwDHisRaV/SlxruZ X-Google-Smtp-Source: APXvYqxF2attYOKTt6nmP4krbfW7CGZ4XSLmSRSDCUAwSCGPaGsdNczM6mIDzoO7DsjmLhY+s2imcQ== X-Received: by 2002:a5d:4fd0:: with SMTP id h16mr31193485wrw.255.1580234050876; Tue, 28 Jan 2020 09:54:10 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 009/142] build-sys: add meson submodule Date: Tue, 28 Jan 2020 18:51:29 +0100 Message-Id: <20200128175342.9066-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200128175342.9066-1-pbonzini@redhat.com> References: <20200128175342.9066-1-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::42c 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: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= 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 19792c9a11..9ddb25695d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -61,3 +61,6 @@ [submodule "roms/qboot"] path =3D roms/qboot url =3D https://github.com/bonzini/qboot +[submodule "meson"] + path =3D meson + url =3D https://github.com/mesonbuild/meson/ diff --git a/configure b/configure index cdc71631e0..b4f36820da 100755 --- a/configure +++ b/configure @@ -172,6 +172,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 } @@ -495,7 +514,6 @@ debug_mutex=3D"no" libpmem=3D"" default_devices=3D"yes" plugins=3D"no" -meson=3Dmeson =20 supported_cpu=3D"no" supported_os=3D"no" @@ -1849,9 +1867,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 0000000000..5031f4981d --- /dev/null +++ b/meson @@ -0,0 +1 @@ +Subproject commit 5031f4981d4fcf6eb0bc950669a0a77a7df22939 diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index fb5d6b3918..c6169db69f 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 2.21.0