Every once in a while I start pondering ways to get rid of the slowness and overwhelming complexity of the autotools machinery, in particular autoconf and libtool. GNU Make has been a great companion for 20+ years, and automake helps with some of the complexity in getting compiler generated dependency tracking going, build libraries and have (un-)install, check, distcheck rules out of the box.

But over the years I’ve had to re-implement or extend each one of these rules and features, and for much of the rest automake is more on the side of getting in the way, which makes me ponder if rolling my own Make rules from scratch isn’t the leaner and also easier way. A basic example to get started is Good Makefiles, except for shared library building.

In fact, libtool has been the one thing that kept me shying away from replacing the autotools monsters. But these days, I’m mostly building things on just Linux. And with other Unixes becoming less relevant, the differences in the creation of shared libraries in the few remaining platforms are starting to look manageable (see e.g. the ifdefs in jlibtool.c). I’d love to learn what else people have been replacing libtool with, besides jlibtool.

The other side is getting rid of configure and autoconf. The Git project for instance can be built without running autoconf/configure and uses plain Makefiles without needing automake. The way that works is by checking the target system via the various invocation variants of UNAME(1) and providing sensible defaults that can be easily customized.

And yes, of course I’ve kept an eye on alternatives. I ported a semi-big project to meson/ninja, but that forces way too much of the build logic into external scripts. Also, GNU Make’s performance is totally on par with ninja if there are just a few dozen or hundreds of source files involved (provided a non-recursive Make setup is used). I’ve also worked with qmake and cmake. But being very familiar with GNU Make, those felt like a step back for me. Mostly because I really enjoy writing my rules in GNU Make without anything getting in the way.

Post comment via email


2019-02-03 Mathieu Bridon

> I’d love to learn what else people have been replacing libtool
> with, besides jlibtool.

A lot of us are replacing the whole Autotools by Meson.

See for example the GNOME goal, which is well underway: