treerack/Makefile

33 lines
532 B
Makefile
Raw Normal View History

2017-06-25 17:51:08 +02:00
SOURCES = $(shell find . -name '*.go')
2017-07-30 05:10:46 +02:00
PARSERS = $(shell find . -name '*.parser')
2017-06-25 17:51:08 +02:00
default: build
imports:
@goimports -w $(SOURCES)
build: $(SOURCES)
go build ./...
2017-07-30 05:10:46 +02:00
check: build $(PARSERS)
2017-06-25 17:51:08 +02:00
go test ./... -test.short -run ^Test
2017-10-29 16:47:03 +01:00
check-all: build $(PARSERS)
go test ./...
2017-06-25 17:51:08 +02:00
fmt: $(SOURCES)
@gofmt -w -s $(SOURCES)
2017-07-30 05:10:46 +02:00
cpu.out: $(SOURCES) $(PARSERS)
2017-07-30 02:35:51 +02:00
go test -v -run TestMMLFile -cpuprofile cpu.out
cpu: cpu.out
go tool pprof -top cpu.out
2017-10-29 16:47:03 +01:00
precommit: fmt build check-all
2017-07-30 02:35:51 +02:00
clean:
@rm -f *.test
@rm -f cpu.out
@go clean -i ./...