Make-ing limitations?

by hobbitalastair

One of the ‘blockers’ for Takahe Linux is the lack of a ‘proper’ build system. Currently, it’s an all-or-nothing approach, which is less than ideal, mostly because it tends to take ~ half an hour or so to rebuild on my PC. I’ve been trying to write a replacement, but I’m struggling, mostly due to the complexity involved…

“Why don’t you take’s approach, and just use make?” I hear you ask. Or maybe not, if you’d never read suckless’s spiel on build systems. But – for my use case, at least – make is broken:

  • There is no easy way to specify if something needs to be rebuilt (if it’s not file-based) – you have to put the tests in the build shell script.
  • There is no way to extend the rule matching system beyond plain old files.
  • There is no easy way to auto generate dependencies. You can do so, by generating a makefile; a process prone to bugs. Also, auto generating makefiles creates a monster makefile, which is not at all fun to read… just one of the issues with autotools, apparently.

Here’s a longer list of issues that I found on the net. Most of these do not really apply to my particular problem, but they are still valid.

However, it mentions that there are alternatives to make. What alternatives?

Here’s what I’ve found:

  • Write another build system yourself.
  • Create a dumb-but-working script.
  • Create yet another specialized makefile generation script.
  • Use another build system, such as CMake, Waf, Scons, Tup, and so on.

Not good :/

Tup looks, by far, the best idea. For my particular use case, it’s broken, mostly because it requires Lua, and I don’t think that it’s that modular. But…