A simple and unix-idiomatic build automator.
haredo
is a build automator - an alternative to e.g. make(1)
and redo(1)
.
Problems with make
:
Problems with redo
:
haredo
solves all of these problems:
redo
haredo
additionally uses the properties of unix-like operating systems extremely idiomatically:
The process for haredo
boils down to this:
for each target argument:
find and run its .do script
if a .do script cannot be found, give a warning
return true if any of the arguments are newer than their parent, else false.
.do
files are written in plain shell script, and will be run using sh -e
to exit on error. The typical structure of a .do script is as follows:
# assemble the dependencies
deps="dep1 dep2"
# run the build on dependencies, and check if they are newer
if haredo $deps
then
# build the target
fi
The above script will only build the target if the result of running haredo
on its dependencies gives a truthy result -- which only happens when one of them is newer.
haredo [-options] targets... [++ sources...]
Detailed usage information can be found in the man page.
Requires scdoc(1)
to build the man page, and a Hare install to build the executable.
git clone https://git.sr.ht/~autumnull/haredo
cd haredo
./bootstrap.sh
./bootstrap.sh install
haredo test
# haredo uninstall
Please send patches and bug reports to ~autumnull/haredo-devel@lists.sr.ht.
General discussion of haredo
happens on ~autumnull/haredo@lists.sr.ht.