Revise Makefile.

This commit is contained in:
Qi Xiao 2016-02-21 18:34:40 +00:00
parent 79856655ac
commit cf277971ae

View File

@ -1,13 +1,17 @@
PKGS := $(filter-out main,$(shell go list -f '{{.Name}}' ./...))
PKG_COVERS := $(addprefix cover/,$(PKGS))
all: get test
STUB := $(GOPATH)/bin/elvish-stub
all: get $(STUB) test
get:
go get .
cc ./stubimpl/main.c -o $(GOPATH)/bin/elvish-stub
test:
$(STUB): ./stubimpl/main.c
$(CC) $< -o $@
test: $(STUB)
go test ./...
: ./stubimpl/test.sh
@ -21,7 +25,7 @@ generate:
go generate ./...
# The target to run on Travis-CI.
travis: get test
travis: all
tar cfJ elvish.tar.xz -C $(GOPATH)/bin elvish elvish-stub
curl http://dl.elvish.io:6060/ -F name=elvish-$(if $(filter-out master,$(TRAVIS_BRANCH)),$(TRAVIS_BRANCH)-,)$(TRAVIS_OS_NAME).tar.xz -F token=$$UPLOAD_TOKEN -F file=@./elvish.tar.xz