A worked example, rendered from real sample data. Sign in to run the tool on your own input.
all: build test
build: deps
go build -o bin/app ./cmd/server
test:
go test ./...
deps:
go mod download
clean:
rm -rf bin/
.PHONY: all build test deps clean5 targets, 0 variables, 4 recipe lines
Default goal: all
.PHONY: all build test deps clean
TARGETS
all: build test [phony]
(no recipe — aggregate or alias target)
build: deps [phony]
$ go build -o bin/app ./cmd/server
test: (none) [phony]
$ go test ./...
deps: (none) [phony]
$ go mod download
clean: (none) [phony]
$ rm -rf bin/
EXECUTION ORDER FOR `make all`
1. deps
2. build
3. test
4. all
FINDINGS: none — this Makefile looks clean.
Explain Makefile targets, variables and the execution order of any goal. Part of the DevTools Surf developer suite. Browse more tools in the Developer Utilities collection.