Experiment: compiling glib with Meson



Hi

I'd like to start this email by saying I'm not suggesting that glib change its build system. This is just an experiment and I figured I'd post the results here in case people are interested.

With that out of the way, I'm working on a new build system called Meson. I have used GLib as a test sample to make sure that it has the necessary features and scalability for real world projects.

As part of this experiment I have rewritten glib's current autotools setup in Meson. I have put the results here:

https://dl.dropboxusercontent.com/u/37517477/glib-meson.tar.xz

If you want to try it out you need Ninja (available in distro packages in Ubuntu and Fedora) and Meson, which you can get here:

https://sourceforge.net/projects/meson/

Extract the packages and cd into the glib directory. Then do this.

mkdir builddir
cd builddir
/path/to/meson.py ..
ninja
ninja test

As you can see, Meson can configure, build and run the test suite of glib. Certain portions are disabled for various reason but most work. The configure step should work on Windows with both MinGW and MSVC, but I have not tested it.

Some numbers (though these are not directly comparable, because the Meson build does not cover the full functionality of the Autotools one):

Meson build definition takes 829 lines.
Autotools takes 7773 lines or 18 842 if you count the m4 macros that come with it.
Configure time for Meson: 5 seconds
Configure for autotools (autogen + configure): 53 seconds

But, again, take these figures with a grain of salt as the Meson configure setup does quite a lot less than the autotools one.

That's about it. Hope you found this interesting. If you have further (non-glib related) questions feel free to email the meson-devel mailing list or even me personally.

Enjoy,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]