Alternatives to waf
Eric S. Raymond
esr at thyrsus.com
Sun Dec 10 04:21:19 UTC 2017
Hal Murray via devel <devel at ntpsec.org>:
> Richard Laager said:
> > While I agree that waf is obscure (and accordingly wish ntpsec used
> > something else), it seems to do the right thing out of the box.
> What are the alternatives? Are there any good ones?
I've done a lot of research and experimenting in this area. My opinions
follow. There are people who will disagree violently with some or all
of these opinions.
Plain makefiles: Simple. Don't scale well to large projects. Don't address the
configuration problem (What options do I want to set?) very well. Don't address
the platform-discovery problem (What APIs are available here?) at all.
autoconf: Everybody's default. Two-phase build system; generates
Makefiles. Addresses both configuration and discovery, though in
primitive ways. It's a pile of nasty hacks and bloat internally,
leading to recipes notoriously difficult to maintain and modify. I
have been expert at it for decades, loathe it intensely, and will
never willingly deploy it again.
scons: One-phase system - does configuration/discovery/build itself,
no generated makefiles. Strong platform-discovery features. Recipes
are easy to read, documentation is mostly good with annoying
gaps. Performance so-so. Dev teram seems asleep at the switch a lot
of the time.
waf: One-phase system. Very fast builds with automatic
parallelization. More powerful than scons, also quite a bit harder to
understand. The waf book might as well be written in Sanskrit or
tensor notation for all the use most people (even build-system experts
like me) can usually get out of it. Maintainer is responsive but his
thought processes are difficult to understand.
cmake: Two-phase system, generates makefiles. Fast, complicated,
fussy, overengineered by Germans, well documented. I won't touch it
because autoconf taught me that two-phase build systems are too hard
to troubleshoot - it's difficult to go from breakage in the generated
makefiles to diagnostics that make sense at the recipe level.
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
My work is funded by the Internet Civil Engineering Institute: https://icei.org
Please visit their site and donate: the civilization you save might be your own.
More information about the devel