-
-
Save junxie6/4aa0a4d94fe8e4a4fd771faeb9c77bcf to your computer and use it in GitHub Desktop.
Example Makefile for small projects in golang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PACKAGES := \ | |
| github.com/eliasson/foo \ | |
| github.com/eliasson/bar | |
| DEPENDENCIES := github.com/eliasson/acme | |
| all: build silent-test | |
| build: | |
| go build -o bin/foo main.go | |
| test: | |
| go test -v $(PACKAGES) | |
| silent-test: | |
| go test $(PACKAGES) | |
| format: | |
| go fmt $(PACKAGES) | |
| deps: | |
| go get $(DEPENDENCIES) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment