-
Notifications
You must be signed in to change notification settings - Fork 13
Add general purpose GNUmakefile #38
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
Conversation
This should work out for anyone on Linux / Mac if they have Example output of the self-installing
|
I need to finish the work for macOS, then I'll take it out of draft. |
This Makefile ignores system Go and installs go locally in `.git/.local/go-<version>/bin/go` and uses that for all make commands. make <go-cmd> make test make test GO-VERSION=1.23.4 You can clone the repo and run `make test` without needing anything installed (except make, curl and bash).
This is working well on Linux and Mac now. Ready for review. |
Had to remove a file. Ready for real now. |
Updated and ready for review. Added support for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This
GNUmakefile
auto-installs (unless go is installed already) go locally in.cache/local/go-<version>/bin/go
and uses that for all make commands.We use the name
GNUmakefile
instead ofMakefile
because that will prevent people from using a non-GNUmake
command to runmake
commands.This doesn't prevent anyone from doing things using their normal style but it adds the following benefits for everyone:
make test
just works in almost any environmentmake test
without needing anything installed (except make, curl and bash).make test GO-VERSION=1.23.4
make shell GO-VERSION=1.23.4