elvish/Makefile

32 lines
545 B
Makefile
Raw Normal View History

2014-01-29 18:37:07 +08:00
EXE := elvish
2014-02-11 12:24:20 +08:00
PKGS := edit eval parse util service elvishd .
PKG_PATHS := $(addprefix ./,$(PKGS)) # go tools want an explicit ./
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-02-10 11:33:01 +08:00
elvish:
go get .
2013-09-18 16:58:51 +08:00
2014-02-10 11:33:01 +08:00
elvishd:
go get ./elvishd
2014-02-10 11:33:01 +08:00
test:
go test $(PKG_PATHS)
coverage/%: %
mkdir -p coverage
go test -coverprofile=$@ ./$<
coverage: $(PKG_COVERAGES)
2014-01-28 14:47:59 +08:00
gofmt:
gofmt -tabwidth=4 -w .
2013-09-18 16:58:51 +08:00
z-%.go: %.go
go tool cgo -godefs $< > $@
2014-01-28 14:47:59 +08:00
pre-commit: gofmt edit/tty/z-types.go
2013-09-18 16:58:51 +08:00
2014-02-10 11:33:01 +08:00
.PHONY: all elvish elvishd test coverage gofmt pre-commit