qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Thomas Huth" <thuth@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Richard Henderson" <rth@twiddle.net>
Subject: Re: [Qemu-devel] converting build system to Meson?
Date: Thu, 18 Apr 2019 10:35:36 +0200	[thread overview]
Message-ID: <1ae50a8a-b669-db47-f1e6-995097c556f3@redhat.com> (raw)
In-Reply-To: <87v9zbpvtk.fsf@dusky.pond.sub.org>

On 18/04/19 10:21, Markus Armbruster wrote:
> Paolo Bonzini <pbonzini@redhat.com> writes:
> 
>> 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 else
>> that has ever tried to replace Autotools, and actually has the potential
>> 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 (similar
>> to Makefile.objs)
> 
> 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/9495ea241aaca5c2242dac1654ef3168bee1657a.
 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

> 
> 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.
> 
>> - ease of distributing a full copy of Meson to support distros that ship
>> an older version (no dependencies apart from Python 3.5).  At 40000
>> lines of Python, Meson is relatively small.
> 
> [...]
> 

WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Thomas Huth" <thuth@redhat.com>,
	"Richard Henderson" <rth@twiddle.net>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [Qemu-devel] converting build system to Meson?
Date: Thu, 18 Apr 2019 10:35:36 +0200	[thread overview]
Message-ID: <1ae50a8a-b669-db47-f1e6-995097c556f3@redhat.com> (raw)
Message-ID: <20190418083536.FMy5rKP2c6B107kYVzKvFeQo403T_-K0kVbmeTt060g@z> (raw)
In-Reply-To: <87v9zbpvtk.fsf@dusky.pond.sub.org>

On 18/04/19 10:21, Markus Armbruster wrote:
> Paolo Bonzini <pbonzini@redhat.com> writes:
> 
>> 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 else
>> that has ever tried to replace Autotools, and actually has the potential
>> 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 (similar
>> to Makefile.objs)
> 
> 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/9495ea241aaca5c2242dac1654ef3168bee1657a.
 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

> 
> 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.
> 
>> - ease of distributing a full copy of Meson to support distros that ship
>> an older version (no dependencies apart from Python 3.5).  At 40000
>> lines of Python, Meson is relatively small.
> 
> [...]
> 



  parent reply	other threads:[~2019-04-18  8:35 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-06 18:12 [Qemu-devel] converting build system to Meson? Paolo Bonzini
2019-03-06 18:50 ` Marc-André Lureau
2019-03-06 21:08   ` Paolo Bonzini
2019-03-07 10:29   ` Daniel P. Berrangé
2019-03-07  6:39 ` Thomas Huth
2019-03-07 10:13   ` Peter Maydell
2019-03-07 11:11     ` Paolo Bonzini
2019-03-07 11:29     ` Dr. David Alan Gilbert
2019-03-07 11:32       ` Peter Maydell
2019-03-07 11:49       ` Marc-André Lureau
2019-03-07 11:33     ` Daniel P. Berrangé
2019-03-10 14:21       ` Markus Armbruster
2019-03-10 14:33     ` Markus Armbruster
2019-03-11 16:30       ` Paolo Bonzini
2019-03-07 10:18   ` Daniel P. Berrangé
2019-03-07 10:40   ` Paolo Bonzini
2019-03-07 10:48     ` Peter Maydell
2019-03-07 11:06       ` Paolo Bonzini
2019-03-07 10:49     ` Daniel P. Berrangé
2019-03-07 10:33 ` Stefan Hajnoczi
2019-03-07 11:54 ` Alex Bennée
2019-03-07 12:56   ` Paolo Bonzini
2019-03-07 13:09     ` Peter Maydell
2019-03-07 13:22       ` Daniel P. Berrangé
2019-03-07 18:13       ` Paolo Bonzini
2019-03-07 18:17         ` Marc-André Lureau
2019-03-07 18:18           ` Peter Maydell
2019-03-07 18:19             ` Peter Maydell
2019-03-07 19:23             ` BALATON Zoltan
2019-03-07 19:50               ` Eric Blake
2019-03-07 20:28             ` Liviu Ionescu
2019-03-08 12:19             ` Daniel P. Berrangé
2019-03-07 19:04           ` Eric Blake
2019-03-07 19:24             ` Eric Blake
2019-03-08 12:21               ` Daniel P. Berrangé
2019-03-07 18:20         ` Alex Bennée
2019-03-08  6:47         ` Gerd Hoffmann
2019-03-08  6:58           ` Thomas Huth
2019-03-08 10:31           ` Peter Maydell
2019-03-08 11:58             ` Gerd Hoffmann
2019-03-08 12:03               ` Peter Maydell
2019-03-08 16:17                 ` Eric Blake
2019-03-08 16:26                   ` Peter Maydell
2019-03-08 16:32                   ` Paolo Bonzini
2019-03-08 16:36                     ` Peter Maydell
2019-03-11  1:09         ` Neal Gompa
2019-03-07 19:05       ` Cleber Rosa
2019-03-10 16:33         ` Markus Armbruster
2019-03-10 16:28 ` Markus Armbruster
2019-03-11  6:42   ` Thomas Huth
2019-03-11 10:14   ` Daniel P. Berrangé
2019-04-18  8:21 ` Markus Armbruster
2019-04-18  8:21   ` Markus Armbruster
2019-04-18  8:35   ` Paolo Bonzini [this message]
2019-04-18  8:35     ` Paolo Bonzini
2019-05-27 16:16 ` [Qemu-devel] Status update on Meson features needed by QEMU Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ae50a8a-b669-db47-f1e6-995097c556f3@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).