God, I hate makefiles.
Once upon a time, 25+ years ago, I wrote a version of make because I needed one. You can still find it on the net. I wrote it for MSDOS and VAX/VMS, and it sucked, but it helped get my builds out of the “just write a script to compile every file, every time” ghetto.
[So, yes, son, we carved our bits out of rocks. Big, heavy damned rocks, uphill both ways, and then we toggled the bits in with our mammoth-hair mittens on, in EBCDIC, with a guy watching the cave mouth for grizzly bears. You have it easy.]
For a long while then, though I had an inkling that parts of it sucked, I still loved make.
These days many of the projects I work with have makefiles whose sizes are in the multi-megabyte range. The wrappers that people have written around the basic technology of make themselves have wrappers. The word “suck” simply doesn’t begin to describe the landscape, these monsters are one or two totally different dimensions removed from simple garden-variety suckage. They are essentially undebuggable, write-once, “just print out what’s going on and see if that last tweak worked” affairs. Is the build going to work? The suspense builds, hour by hour… nope, you don’t get to go home. “Thanks again, make!” From what I read on the net (and from feedback of ex-cow-orkers), the Ant world isn’t much better.
These declarative gobblers need debuggers and good test frameworks because, frankly, people (and projects) are dying out there. Help them. (No, I don’t have time. When this next build pops out, I have to integrate it into the main branch, build that, and . . .).
I’ve done build systems at three or four startups. In most cases the developers started with batch files or shell scripts and didn’t try to move off of them until the pain became so great that they had to. In one shop, after I got done doing a complete automated build-and-unit-test system — you just pressed one button and it went “Slurp! Zing! Pop!” and sent you mail with the build results — the person whose job it had been to manually copy library files from point A to point B during one phase of the build — asked during a meeting, “I’m confused, so when do I do that copy again?” Soon after I left, that firm suffered the worst catastrophe a start-up can encounter, that is, it did not rapidly go out of business, and as far as I know is still forging ahead in the unutterable darkness, chewing up the souls of the unfortunates who get suckered in by the glamour and promise of a job, until they realize that the Software Witch King really is running the place and have to forfeit their mortal souls to escape back to the realm of light.
So, we need something better than make. I’ve got some ideas…