-
Notifications
You must be signed in to change notification settings - Fork 44
Description
I was thinking about how to use mmake with projects where potential contributors may or may not have it, and asking them to install it is another step that doesn't feel totally necessary. The idea I came up with is to have a secondary MMakefile (or similar) that contains remote includes, and can (optionally) be used to generate a Makefile with the remote includes inlined.
For instance:
# MMakefile
include github.com/foo/make/bar
$ mmake gen
# Makefile
bar:
// Contents of github.com/foo/make/bar
Basically mmake would check for MMakefile before Makefile when executing a target, so you could have either a MMakefile, Makefile, or both.
Alternatively, it could suffice to support overwriting a target in a Makefile with the latest version of a remote. For example, the sanity and precommit targets here are actually copy+pasted from what would have been remote includes if I were to enforce mmake being installed, which isn't ideal because there are already hurdles to contributing to that project. What would be nice is to be able to update these targets inline with the latest contents of the remote targets, something like:
$ mmake update sanity github.com/KyleBanks/make/go/sanity
After this the Makefile would contain the latest version of sanity.