As developers, we have lots of build tools on the level of building single executables. The venerable make, of course, is everywhere, and does a great job. It is joined by similar tools, like ant, maven, and a ton of others.
All of them are really hard to use for tasks that aren’t building a single, or small set of executables. If you put together something different, you find yourself having to shoehorn tasks into a framework that really wasn’t made for it. For example with make, you often end up creating lots of auxiliary files whose existence often feels harder to manage than to not use make at all. Few of those tools even want to support any kind of modularity, so you could plug multiple build definitions into something larger.
For Indie Box, I find myself having to put together things like a boot image on a USB stick that contains lots of packages (perhaps hundreds), and having to run lots of tests (also perhaps hundreds) that are a lot more complex than “make test”. So this was the time to build a more suitable build / release framework.
Introducing “macrobuild”. Code is on github at https://github.com/indiebox/macrobuild.
- Free/open-source, written in Perl, very extensible
- macrobuild runs a single Task, specified in the command line
- There is a library of basic Tasks that might be useful for lots of people, but you usually write your own Tasks simply by subclassing Task.pm
- Tasks may be composite, by invoking sub-tasks, which, in turn, also may invoke sub-tasks
- Tasks can pass to each other arbitrarily complex data, so there’s a bit of a data flow architecture in macrobuild.
- Tasks can succeed (with results), fail, or succeed (with nothing to do). Each Task gets to decide itself whether it needs to do something or not. This generalizes the “make” dependency mechanism.
- Everything is declarative.
- Of course, you can write Tasks that invoke “micro” build tasks, like using make or ant.
I’ll document specific examples for how to use when I have them ready to go. In the meantime, you should be able to use macrobuild simply by cloning the git repo, and running it. Enjoy!