Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to generate Makefiles and/or update targets #18

Open
KyleBanks opened this issue Mar 26, 2017 · 0 comments
Open

Ability to generate Makefiles and/or update targets #18

KyleBanks opened this issue Mar 26, 2017 · 0 comments

Comments

@KyleBanks
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants