提交 b4fd5718 编写于 作者: D Derek Parker

make: Fix 'build' and 'install' targets

Fixes #273
上级 5e31400a
......@@ -13,7 +13,8 @@ ALL_PACKAGES=$(shell go list ./... | grep -v /vendor/)
# unable to execute.
# See https://github.com/golang/go/issues/11887#issuecomment-126117692.
ifeq "$(UNAME)" "Darwin"
FLAGS=-ldflags="-s" -exec=$(shell pwd)/scripts/testsign
BUILD_FLAGS=-ldflags="-s"
TEST_FLAGS=-exec=$(shell pwd)/scripts/testsign
DARWIN="true"
endif
......@@ -28,13 +29,13 @@ endif
endif
build: check-cert
go build $(FLAGS) github.com/derekparker/delve/cmd/dlv
go build $(BUILD_FLAGS) github.com/derekparker/delve/cmd/dlv
ifdef DARWIN
codesign -s $(CERT) ./dlv
endif
install: check-cert
go install $(FLAGS) github.com/derekparker/delve/cmd/dlv
go install $(BUILD_FLAGS) github.com/derekparker/delve/cmd/dlv
ifdef DARWIN
codesign -s $(CERT) $(GOPATH)/bin/dlv
endif
......@@ -44,14 +45,14 @@ ifeq "$(TRAVIS)" "true"
ifdef DARWIN
sudo -E go test -v $(ALL_PACKAGES)
else
go test $(FLAGS) $(ALL_PACKAGES)
go test $(TEST_FLAGS) $(BUILD_FLAGS) $(ALL_PACKAGES)
endif
else
go test $(FLAGS) $(ALL_PACKAGES)
go test $(TEST_FLAGS) $(BUILD_FLAGS) $(ALL_PACKAGES)
endif
test-proc-run:
go test $(FLAGS) $(PREFIX)/proc -run $(RUN)
go test $(TEST_FLAGS) $(BUILD_FLAGS) $(PREFIX)/proc -run $(RUN)
test-integration-run:
go test $(FLAGS) $(PREFIX)/service/test -run $(RUN)
go test $(TEST_FLAGS) $(BUILD_FLAGS) $(PREFIX)/service/test -run $(RUN)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册