tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Compiling NetBSD mtree in-tree with meson.build



Hi Greg, 

Ninja does exactly one thing, maintain dependencies and does that very well. It is intended to be doing only this, nothing cheesy about it. 
Ninja has a reference implementation in C++, but was ported to many different languages.

Meson is a build system that relies on backends, Ninja is one of them.
Meson has a reference implementation written in Python, but was already ported to many different languages, including, C99. 
https://sr.ht/~lattis/muon/ This implementation of Meson sports a builtin Ninja backend as well, so you can build Meson using only C99, no C++, no Python.

I share your sentiment about CMake….

Bsdmake is very decent as a build system, if you stay on the surface. But it becomes quite nasty when you dive below. Also with bsdmake you can do arbitrary things, which is not good. A build system should describe your build, not make your coffee.
This is where Meson is excelling - you cannot do miracles in Meson, you can only describe your build. And anybody reading that build file will immediately know what is going to happen when it is run. This is a huge contrast to bsdmake.

Cheers,

Keve


On 15 Jan 2025, at 22:13, Greg A. Woods <woods%planix.ca@localhost> wrote:

At Wed, 15 Jan 2025 13:41:25 -0500 (EST), Mouse <mouse%Rodents-Montreal.ORG@localhost> wrote:
Subject: Re: Compiling NetBSD mtree in-tree with meson.build

More generally, I don't really understand the recent proliferation of
autotools-replacement build systems.  cmake, meson, ninja, etc,

It pretty much all boils down to one target system:  MS-Windows (and I
suppose Android too, to some extent.)

Also C++ programmers.  They don't seem to be able to write primarily
portable code and they (perhaps rightfully) hate Autotools (and indeed
most of the time they don't really like anything POSIX-y either).

CMake is the worst abomination in the history of software configuration
management, or perhaps in the entirety of the history of software
development.  It doesn't even have a real syntax (though arguably it is
somewhat like a "functional" language, just without a real syntax).

Ninja is a cheesy poor-man's Make, but hey! it's written in C++!  It is
supposedly fast, but it doesn't really do anything more than build a
DAG, check the file times, and run the necessary commands to update
whatever's out of date.  Ninja pretty much requires something outside of
itself to generate it's configuration files (but then again so does any
plain POSIX-only make).

Meson is kinda decent though -- arguably way better than Autotools (as
would be anything avoiding M4 and perl) -- except it cannot generate
even plain-POSIX makefiles!  (and it's too friendly with CMake, and it
requires a the whole Python ecosystem)

It's too bad whole-project build tools like Jam or (especially) Cook
didn't gain more traction.  Cook's syntax is arguably atrocious and
ugly, but it's extremely powerful, and it does dependency DAGs correctly
to the extreme such that whole-project parallel builds are trivial.

--
Greg A. Woods <gwoods%acm.org@localhost>

Kelowna, BC     +1 250 762-7675           RoboHack <woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost>     Avoncote Farms <woods%avoncote.ca@localhost>



Home | Main Index | Thread Index | Old Index