Monday, September 28, 2009
Moldy software build systems
James Hague points out that many software build systems are baroque, and used infrequently enough that only the truly hardcore ever become competent:
I'm pretty sure there's a standard old build system to do this kind of thing, but in a clunky way where you have to be careful whether you use spaces or tabs, remember arcane bits of syntax, remember what rules and macros are built-in, remember tricks involved in building nested projects, remember the differences between the versions that have gone down their own evolutionary paths. I use it rarely enough that I forget all of these details. There are modern variants, too, that trade all of that 1970s-era fiddling for different lists of things to remember. ...
Not to mention properly quoting pathnames that have spaces in them. Especially if there are wildcards involved.
But there's no need. ... It's easier and faster to put together custom, micro-build systems in the high-level language of your choice.
Lately I have been using ANTLR—a parser generator—to make a compiler for a new programming language. (Everybody needs their own programming language!) It appears to be a wonderful package ... but the build system uses Apache Maven.
Somebody noticed that obtaining the prerequisites was a lot of work when building open source projects. Apparently that somebody decided to tackle the challenge by integrating the dependency tracker, package manager, and download tool into the build manager.
However, if you are operating under a restricted environment or behind a firewall, you might need to prepare to run Maven, as it requires write access to the home directory (~/.m2 on Unix/Mac OS X and C:\Documents and Settings\username\.m2 on Windows) and network access to download binary dependencies.
That's certainly reassuring. The build control file is written in XML:
As a wise man once said, "As God is my witness, I thought turkeys could fly."
Update: fixed XML. And title. And fixed the XML again. This time for sure. No, this time for sure.
We just switched our multi-platform (Unix, Linux, OS X, Windows) build system to cmake from Qt's qmake. To speed it up we also use a parallel build server (icecream).
Links to this post: