2013-09-18 16:58:51 +08:00
|
|
|
EXE := das
|
2014-01-28 14:42:53 +08:00
|
|
|
PKGS := edit eval parse util
|
2014-01-25 21:15:54 +08:00
|
|
|
PKG_PATHS := $(addprefix ./,$(PKGS)) # go tools want an explicit ./
|
|
|
|
PKG_COVERAGES := $(addsuffix .coverage,$(PKGS))
|
2013-09-18 16:58:51 +08:00
|
|
|
|
2014-01-25 21:17:16 +08:00
|
|
|
exe:
|
2013-09-18 16:58:51 +08:00
|
|
|
go build -o $(EXE) ./main
|
|
|
|
|
2014-01-25 21:15:54 +08:00
|
|
|
test:
|
|
|
|
go test $(PKG_PATHS)
|
|
|
|
|
|
|
|
%.coverage: %
|
|
|
|
go test -coverprofile=$@ ./$<
|
|
|
|
|
|
|
|
coverage: $(PKG_COVERAGES)
|
|
|
|
|
2013-09-18 16:58:51 +08:00
|
|
|
z-%.go: %.go
|
|
|
|
go tool cgo -godefs $< > $@
|
|
|
|
|
2013-11-15 19:01:46 +08:00
|
|
|
pre-commit: edit/tty/z-types.go
|
2013-09-18 16:58:51 +08:00
|
|
|
|
2014-01-25 21:17:16 +08:00
|
|
|
.PHONY: exe test coverage main pre-commit
|