From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:46851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hH2WI-0002bm-TY for qemu-devel@nongnu.org; Thu, 18 Apr 2019 04:35:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hH2WH-0004bg-LT for qemu-devel@nongnu.org; Thu, 18 Apr 2019 04:35:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43542) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hH2WH-0004av-CL for qemu-devel@nongnu.org; Thu, 18 Apr 2019 04:35:45 -0400 References: <3246431b-8d6e-f2bc-e0f0-99d80384d97b@redhat.com> <87v9zbpvtk.fsf@dusky.pond.sub.org> From: Paolo Bonzini Message-ID: <1ae50a8a-b669-db47-f1e6-995097c556f3@redhat.com> Date: Thu, 18 Apr 2019 10:35:36 +0200 MIME-Version: 1.0 In-Reply-To: <87v9zbpvtk.fsf@dusky.pond.sub.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] converting build system to Meson? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel , Peter Maydell , Thomas Huth , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , Richard Henderson On 18/04/19 10:21, Markus Armbruster wrote: > Paolo Bonzini writes: >=20 >> Hi all, >> >> lately I have been thinking of converting the QEMU build system to >> Meson. Meson is a relatively new build system that can replace >> Autotools or hand-written Makefiles such as QEMU; as a die-hard >> Autotools fan, I must say that Meson is by far better than anything el= se >> that has ever tried to replace Autotools, and actually has the potenti= al >> to do so. >> >> Advantages of Meson that directly matter for QEMU include: >> >> - build definitions in a very readable and user friendly DSL, which >> supports looping and conditions. >> >> - ability to introspect the build definitions so that you can find out >> what is built without building it (the DSL is not Turing complete and >> most objects in it are immutable, so it cannot be abused that much :)) >> >> - support for a non-recursive build from per-subdirectory input (simil= ar >> to Makefile.objs) >=20 > Could Meson build the $(TARGET_DIRS) non-recursively? Yes. It doesn't support recursive builds at all, in fact. If you can stand the C++, you can find a "testcase slash example with obvious QEMU inspiration" at https://github.com/mesonbuild/meson/pull/5028/commits/9495ea241aaca5c2242= dac1654ef3168bee1657a. In fact, that pull request is basically the last obvious missing piece before one could seriously try Meson for QEMU. Then of course there are the non-obvious missing pieces, but those are more bugfixes than anything else. Paolo >=20 > I'm asking because I find the make recursion there annoying. As usual > with recursion, we have to dumb down dependencies: if anything made by > the recursion needs X, then everything does. If making X fails, we > don't recurse. Defeats -k. >=20 >> - ease of distributing a full copy of Meson to support distros that sh= ip >> an older version (no dependencies apart from Python 3.5). At 40000 >> lines of Python, Meson is relatively small. >=20 > [...] >=20 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14C7EC10F0B for ; Thu, 18 Apr 2019 08:36:47 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CB2F520835 for ; Thu, 18 Apr 2019 08:36:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CB2F520835 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([127.0.0.1]:38015 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hH2XF-000309-PE for qemu-devel@archiver.kernel.org; Thu, 18 Apr 2019 04:36:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hH2WI-0002bm-TY for qemu-devel@nongnu.org; Thu, 18 Apr 2019 04:35:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hH2WH-0004bg-LT for qemu-devel@nongnu.org; Thu, 18 Apr 2019 04:35:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43542) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hH2WH-0004av-CL for qemu-devel@nongnu.org; Thu, 18 Apr 2019 04:35:45 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0599A3008CCE; Thu, 18 Apr 2019 08:35:43 +0000 (UTC) Received: from [10.36.112.46] (ovpn-112-46.ams2.redhat.com [10.36.112.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E503F5D9D6; Thu, 18 Apr 2019 08:35:38 +0000 (UTC) To: Markus Armbruster References: <3246431b-8d6e-f2bc-e0f0-99d80384d97b@redhat.com> <87v9zbpvtk.fsf@dusky.pond.sub.org> From: Paolo Bonzini Openpgp: preference=signencrypt Autocrypt: addr=pbonzini@redhat.com; prefer-encrypt=mutual; keydata= mQHhBFRCcBIBDqDGsz4K0zZun3jh+U6Z9wNGLKQ0kSFyjN38gMqU1SfP+TUNQepFHb/Gc0E2 CxXPkIBTvYY+ZPkoTh5xF9oS1jqI8iRLzouzF8y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izK3w7mRpvGcg+/ZRG4DEMHLP6JVsv5GMpoYwYOmHnplOzCXHvmdlW0i6SrMsB Dl9rw4AtIa6bRwWLim1lQ6EM3PWifPrWSUPrPcw4OLSwFk0CPqC4HYv/7ZnASVkR5EERFF3+ 6iaaVi5OgBd81F1TCvCX2BEyIDRZLJNvX3TOd5FEN+lIrl26xecz876SvcOb5SL5SKg9/rCB ufdPSjojkGFWGziHiFaYhbuI2E+NfWLJtd+ZvWAAV+O0d8vFFSvriy9enJ8kxJwhC0ECbSKF Y+W1eTIhMD3aeAKY90drozWEyHhENf4l/V+Ja5vOnW+gCDQkGt2Y1lJAPPSIqZKvHzGShdh8 DduC0U3xYkfbGAUvbxeepjgzp0uEnBXfPTy09JGpgWbg0w91GyfT/ujKaGd4vxG2Ei+MMNDm S1SMx7wu0evvQ5kT9NPzyq8R2GIhVSiAd2jioGuTjX6AZCFv3ToO53DliFMkVTecLptsXaes uUHgL9dKIfvpm+rNXRn9wAwGjk0X/A== Message-ID: <1ae50a8a-b669-db47-f1e6-995097c556f3@redhat.com> Date: Thu, 18 Apr 2019 10:35:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <87v9zbpvtk.fsf@dusky.pond.sub.org> Content-Type: text/plain; charset="UTF-8" Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Thu, 18 Apr 2019 08:35:43 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: Re: [Qemu-devel] converting build system to Meson? X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Richard Henderson , qemu-devel , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Message-ID: <20190418083536.FMy5rKP2c6B107kYVzKvFeQo403T_-K0kVbmeTt060g@z> On 18/04/19 10:21, Markus Armbruster wrote: > Paolo Bonzini writes: >=20 >> Hi all, >> >> lately I have been thinking of converting the QEMU build system to >> Meson. Meson is a relatively new build system that can replace >> Autotools or hand-written Makefiles such as QEMU; as a die-hard >> Autotools fan, I must say that Meson is by far better than anything el= se >> that has ever tried to replace Autotools, and actually has the potenti= al >> to do so. >> >> Advantages of Meson that directly matter for QEMU include: >> >> - build definitions in a very readable and user friendly DSL, which >> supports looping and conditions. >> >> - ability to introspect the build definitions so that you can find out >> what is built without building it (the DSL is not Turing complete and >> most objects in it are immutable, so it cannot be abused that much :)) >> >> - support for a non-recursive build from per-subdirectory input (simil= ar >> to Makefile.objs) >=20 > Could Meson build the $(TARGET_DIRS) non-recursively? Yes. It doesn't support recursive builds at all, in fact. If you can stand the C++, you can find a "testcase slash example with obvious QEMU inspiration" at https://github.com/mesonbuild/meson/pull/5028/commits/9495ea241aaca5c2242= dac1654ef3168bee1657a. In fact, that pull request is basically the last obvious missing piece before one could seriously try Meson for QEMU. Then of course there are the non-obvious missing pieces, but those are more bugfixes than anything else. Paolo >=20 > I'm asking because I find the make recursion there annoying. As usual > with recursion, we have to dumb down dependencies: if anything made by > the recursion needs X, then everything does. If making X fails, we > don't recurse. Defeats -k. >=20 >> - ease of distributing a full copy of Meson to support distros that sh= ip >> an older version (no dependencies apart from Python 3.5). At 40000 >> lines of Python, Meson is relatively small. >=20 > [...] >=20