2014-01-29 18:37:07 +08:00
|
|
|
EXE := elvish
|
2014-03-09 15:16:56 +08:00
|
|
|
PKGS := edit eval parse util service elvishd sys
|
2014-01-25 21:15:54 +08:00
|
|
|
PKG_PATHS := $(addprefix ./,$(PKGS)) # go tools want an explicit ./
|
2014-01-28 20:39:14 +08:00
|
|
|
PKG_COVERAGES := $(addprefix coverage/,$(PKGS))
|
2013-09-18 16:58:51 +08:00
|
|
|
|
2014-02-10 11:33:01 +08:00
|
|
|
all: elvish elvishd 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-02-10 11:33:01 +08:00
|
|
|
elvishd:
|
2014-02-10 13:22:03 +08:00
|
|
|
go get ./elvishd
|
2014-02-10 11:33:01 +08:00
|
|
|
|
2014-01-25 21:15:54 +08:00
|
|
|
test:
|
|
|
|
go test $(PKG_PATHS)
|
|
|
|
|
2014-01-28 20:39:14 +08:00
|
|
|
coverage/%: %
|
|
|
|
mkdir -p coverage
|
2014-01-25 21:15:54 +08:00
|
|
|
go test -coverprofile=$@ ./$<
|
|
|
|
|
|
|
|
coverage: $(PKG_COVERAGES)
|
|
|
|
|
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-03-30 15:05:44 +08:00
|
|
|
.PHONY: all elvish elvishd test coverage pre-commit
|