Skip to content

Instantly share code, notes, and snippets.

@junxie6
Forked from eliasson/Makefile
Created February 18, 2018 18:46
Show Gist options
  • Select an option

  • Save junxie6/4aa0a4d94fe8e4a4fd771faeb9c77bcf to your computer and use it in GitHub Desktop.

Select an option

Save junxie6/4aa0a4d94fe8e4a4fd771faeb9c77bcf to your computer and use it in GitHub Desktop.
Example Makefile for small projects in golang
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