This is a collection of Makefile snippets (and associated utilities) for use in Datawire projects.
It has the following downsides:
cd
to a sub-directory,
run make
, and have it just build the stuff in that directory.go
or setup.py
..mk
snippets have a hard dependency on the go
program being in PATH
, even if none of the sources are Go.If any of those are a bummer, but you still want the "Make snippets in
a ./build-aux/
folder" concept, consider
Autothing (which has the
downsides that it requires GNU Make 3.82 or above, and is slow).
At Datawire, those are good trade-offs, since:
Add build-aux.git
as build-aux/
in the git repository of the
project that you want to use this from. I recommend that you do this
using git subtree
, but git submodule
is fine too.
Then, in your Makefile, write include build-aux/FOO.mk
for each
common bit of functionality that you want to make use of.
git-subtree
to manage ./build-aux/
Start using build-aux:
$ git subtree add --squash --prefix=build-aux git@github.com:datawire/build-aux.git master
Update to latest build-aux:
$ ./build-aux/build-aux-pull
Push "vendored" changes upstream to build-aux.git:
$ ./build-aux/build-aux-push
.mk
snippet contains a reference-quality header comment
identifying
.mk
file..mk
file.common.mk
targets)docs/intro.md
is an introduction to
big-picture ideas in *.mk
snippets.docs/golang.md
discusses support for building
software written in Go.docs/testing.md
discusses adding tests to
make check
.HACKING.md
has guidelines for contributing to
build-aux.git
.