mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-12 17:27:50 +08:00
27 lines
474 B
Makefile
27 lines
474 B
Makefile
EXE := das
|
|
PKGS := edit eval parse util
|
|
PKG_PATHS := $(addprefix ./,$(PKGS)) # go tools want an explicit ./
|
|
PKG_COVERAGES := $(addprefix coverage/,$(PKGS))
|
|
|
|
exe:
|
|
go install github.com/xiaq/das
|
|
|
|
test:
|
|
go test $(PKG_PATHS)
|
|
|
|
coverage/%: %
|
|
mkdir -p coverage
|
|
go test -coverprofile=$@ ./$<
|
|
|
|
coverage: $(PKG_COVERAGES)
|
|
|
|
gofmt:
|
|
gofmt -tabwidth=4 -w .
|
|
|
|
z-%.go: %.go
|
|
go tool cgo -godefs $< > $@
|
|
|
|
pre-commit: gofmt edit/tty/z-types.go
|
|
|
|
.PHONY: exe test coverage gofmt pre-commit
|