Tuesday, 6 March 2018

Finding a build tool

As someone who actually thinks that make(1) is a wonderful tool if used correctly, that's what I've normally been using. I'm talking about BSD make, mind you, not the abomination that is GNU make.

For those who are unaware, a typical Makefile looks somewhat like this:

PROG_CXX=       hello

.include <bsd.prog.mk>

Since I also take note of my environment, it hasn't escaped me that that's not what most people seem to be doing nowadays. While I don't have much time for people whining about make(1) given its clear, straightforward and problem-oriented syntax, I do believe there is room for improvement and I'm curious what people have been coming up with in the decades since make's inception.

One of the most widely used tools nowadays appears to be CMake. However, looking at the syntax of CMake's language reminds me mostly of Tcl, and that's not a good thing. Passing sequences of strings as arguments where certain strings modify the interpretation of the strings that come after them is not just a glaring lack of design but also neither fault tolerant nor easy to read. It is also based on the idea of (badly) generating code which I find revolting. As if that wasn't bad enough, it also clutters the source tree with cache files and other clutter which is unacceptable for someone refusing to go down the .*ignore route. Next.

The next big candidate that comes up is Boost.Build. Interestingly, the Jam language suffers almost identical shortcomings as CMake's with lists of strings and certain keywords modifying their semantic, making me almost believe that this might be endemic to people designing build systems. Fail.

Another popular option that comes up is Gradle. It requires a JDK in order to run the build process. What is more, it has a feature matrix showing which platforms and compilers it supports – how is that even relevant!? No thanks.

The search continues…

To be evaluated (in no particular order apart from alphabetical):