treerack/Makefile

29 lines
419 B
Makefile
Raw Normal View History

2017-06-25 17:51:08 +02:00
SOURCES = $(shell find . -name '*.go')
default: build
imports:
@goimports -w $(SOURCES)
build: $(SOURCES)
go build ./...
check: build
go test ./... -test.short -run ^Test
fmt: $(SOURCES)
@gofmt -w -s $(SOURCES)
2017-07-30 02:35:51 +02:00
cpu.out: $(SOURCES)
go test -v -run TestMMLFile -cpuprofile cpu.out
cpu: cpu.out
go tool pprof -top cpu.out
2017-06-25 23:38:32 +02:00
precommit: fmt build check
2017-07-30 02:35:51 +02:00
clean:
@rm -f *.test
@rm -f cpu.out
@go clean -i ./...