I think switching to a better build system is a worthwhile goal. Every switch
to meson that I have seen has worked out well and was definitely worth the
work. Apart from the speed and number-of-lines benefits that Igor listed, there
are less tangible but important benefits that come from a better configuration
language and more control over the configuration results. The logic expressed
in meson can be much more elaborate when needed, because we have something that
is a normal programming language, so
build-this-if-that-and-that-but-not-the-other-thing becomes possible to express
in a way that is understood by any contributor to the project, not just
macro-m4-shell-automake wizards. And obviously, the relatively simple cases
become much clearer too. All this lowers the bar for contribution.
Meson also allows more precise interaction with the code. A simple but
illustrative case is the ability to switch from `#ifdef HAVE_` to `#if HAVE_`.
(Autotools uses `#define HAVE_FOO 1`/`#undef HAVE_FOO` in most cases, except
for e.g. `#define HAVE_DECL_FOO 1`/`#define HAVE_DECL_FOO 0`, inconsistently
and immutably. Meson allows `#define HAVE_FOO 1`/`#define HAVE_FOO 0`). This
makes the `#if`-conditionals in code more consistent. `-Werror=undef` can be
used to catch mistyped HAVE_ variables that often lurk for years without anyone
noticing.
Finally, meson+ninja do a better job at expressing and managing dependencies.
Meson is able to capture dependencies between build steps much better than
autotools, and in effect ninja is great at *partial* rebuilds. So partial
rebuilds that only depend on a single file become nearly instantaneous and
operations like "change build flag and rebuild anything *using* that build
flag" work. With autotools, in many cases a full rebuild-from-scratch operation
would be necessary.
> rpm sits really early in the bootstrap chain
When *installing* a new system, having rpm depend on python would be an issue.
But when bootstrapping in the sense of building from scratch, I don't think
this is a significant issue. Python is generally available on all platforms,
and a non-rpm-packaged or non-native-rpm-installed-version could be used to
build rpm. After rpm has been built, it wouldn't care about Python any more. So
requiring Python at some point in the bootstrap cycle seems totally OK.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1209#issuecomment-625711545
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint