2014-01-29 18:37:07 +08:00
|
|
|
EXE := elvish
|
2014-10-01 06:57:38 +08:00
|
|
|
PKGS := edit eval parse util sys store
|
2014-01-25 21:15:54 +08:00
|
|
|
PKG_PATHS := $(addprefix ./,$(PKGS)) # go tools want an explicit ./
|
2014-09-28 17:22:28 +08:00
|
|
|
PKG_COVERS := $(addprefix cover/,$(PKGS))
|
2013-09-18 16:58:51 +08:00
|
|
|
|
2014-10-01 05:14:40 +08:00
|
|
|
all: elvish test
|
2014-01-31 21:08:56 +08:00
|
|
|
|
2014-02-10 11:33:01 +08:00
|
|
|
elvish:
|
2014-02-10 13:22:03 +08:00
|
|
|
go get .
|
2013-09-18 16:58:51 +08:00
|
|
|
|
2014-01-25 21:15:54 +08:00
|
|
|
test:
|
|
|
|
go test $(PKG_PATHS)
|
|
|
|
|
2014-09-25 05:56:12 +08:00
|
|
|
cover/%: %
|
|
|
|
mkdir -p cover
|
2014-01-25 21:15:54 +08:00
|
|
|
go test -coverprofile=$@ ./$<
|
|
|
|
|
2014-09-28 17:22:28 +08:00
|
|
|
cover: $(PKG_COVERS)
|
2014-01-25 21:15:54 +08:00
|
|
|
|
2013-09-18 16:58:51 +08:00
|
|
|
z-%.go: %.go
|
|
|
|
go tool cgo -godefs $< > $@
|
|
|
|
|
2014-03-30 15:05:44 +08:00
|
|
|
pre-commit: edit/tty/z-types.go
|
2013-09-18 16:58:51 +08:00
|
|
|
|
2014-10-01 05:14:40 +08:00
|
|
|
.PHONY: all elvish test cover pre-commit
|