[Babel-users] Use of Meson+Ninja build systems to compile babeld

Antonin Décimo antonin.decimo at gmail.com
Mon Oct 8 18:36:08 BST 2018


[Cross-posted on GitHub]

Hello everyone,

Following a more-or-less recent trend, I wrote some time ago a Meson
build file for babeld.

>From [Meson][1] website:
> Meson is an open source build system meant to be both extremely
> fast, and, even more importantly, as user friendly as possible.

If you're familiar with CMake, Meson achieves the same end result, but
with ease and simplicity. Meson outputs a [Ninja][2] build file; a
"small build system with a focus on speed". Notable projects using
Meson+Ninja are Xorg, Mesa, GNOME. Ninja is also used by LLVM and
Chromium.


I believe this would help compiling babeld with optimizations in mind
(such as LTO), releasing source tarballs, binaries, and distro
packages, and also help managing upcoming crypto dependencies.
On my laptop, a clean build takes 5s with Meson+Ninja, from 10s with
make.

I think (and hope) it will help distro packagers, especially when
cross-compiling. The release process is eased, and the compilation
time is fastened.


Meson is an out-of-source build process, and boils down to:

    $ meson build && cd build && ninja

A single `ninja` is needed to (incrementally) rebuild.

Releasing a source tarball of babeld is easy; simply edit
`meson.build` to specify the version tag, then:

    meson release && ninja -C release dist

…and the tarball will be found in the `release/meson-dist` directory.


Both build systems can still be used. The required changes are:
- renaming of `babeld.man` to `babeld.8`;
- use of a ` version.h.in` configure file;
- `version.h` file is regenerated at each build.


The pull-request lives on GitHub [3]. I think the whole thing can
prove useful, in any case please let me know your thoughts. I'd
appreciate insights from distro packagers.

-- Antonin Décimo

[1]: http://mesonbuild.com/
[2]: https://ninja-build.org/
[3]: https://github.com/jech/babeld/pull/21
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/babel-users/attachments/20181008/52130775/attachment.html>


More information about the Babel-users mailing list