datawire / build-aux

Common Makefile snippets
1 stars 0 forks source link

Datawire build-aux

This is a collection of Makefile snippets (and associated utilities) for use in Datawire projects.

It has the following downsides:

  1. It does not support out-of-tree builds.
  2. It has no notion of nesting. You cannot cd to a sub-directory, run make, and have it just build the stuff in that directory.
  3. It has no notion of nesting. If you want per-directory build descriptions, you'll have to build that functionality yourself, or offload it to a separate build-system, like go or setup.py.
  4. Most of the .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:

How to use

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.

Using git-subtree to manage ./build-aux/

Documentation