That's good advice, but in this case I'm wondering, why use variables at all? The makefile is only being used as a collection of aliases. They could all be inlined without losing anything.
BINARY_NAME := mybinary
BINARY_UNIX := $(BINARY_NAME)_unix
.PHONY: all test build clean run deps
all: test build
build: ; go build -o $(BINARY_NAME) -v
test: ; go test -v ./...
clean: ; go clean && rm -f $(BINARY_NAME) $(BINARY_UNIX)
run: ; go run $(BINARY_NAME) -v ./...
deps: DEPS := $(addprefix github.com/markbates/,goth pop)
deps: ; go get $(DEPS)
build-linux: ; CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o $(BINARY_UNIX) -v
docker-build: ; docker run --rm -it -v "$(GOPATH)":/go -w /go/src/bitbucket.org/rsohlich/makepost golang:latest go build -o "$(BINARY_UNIX)" -v
Caveat. I haven't tested that, but something close to that would be much clearer.But in a small makefile, it's a simple search-and-replace to move it out to a variable. Adding indirection slightly degrades readability, so better to wait until it's first needed.