提交 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/) ...@@ -13,7 +13,8 @@ ALL_PACKAGES=$(shell go list ./... | grep -v /vendor/)
# unable to execute. # unable to execute.
# See https://github.com/golang/go/issues/11887#issuecomment-126117692. # See https://github.com/golang/go/issues/11887#issuecomment-126117692.
ifeq "$(UNAME)" "Darwin" ifeq "$(UNAME)" "Darwin"
FLAGS=-ldflags="-s" -exec=$(shell pwd)/scripts/testsign BUILD_FLAGS=-ldflags="-s"
TEST_FLAGS=-exec=$(shell pwd)/scripts/testsign
DARWIN="true" DARWIN="true"
endif endif
...@@ -28,13 +29,13 @@ endif ...@@ -28,13 +29,13 @@ endif
endif endif
build: check-cert build: check-cert
go build $(FLAGS) github.com/derekparker/delve/cmd/dlv go build $(BUILD_FLAGS) github.com/derekparker/delve/cmd/dlv
ifdef DARWIN ifdef DARWIN
codesign -s $(CERT) ./dlv codesign -s $(CERT) ./dlv
endif endif
install: check-cert install: check-cert
go install $(FLAGS) github.com/derekparker/delve/cmd/dlv go install $(BUILD_FLAGS) github.com/derekparker/delve/cmd/dlv
ifdef DARWIN ifdef DARWIN
codesign -s $(CERT) $(GOPATH)/bin/dlv codesign -s $(CERT) $(GOPATH)/bin/dlv
endif endif
...@@ -44,14 +45,14 @@ ifeq "$(TRAVIS)" "true" ...@@ -44,14 +45,14 @@ ifeq "$(TRAVIS)" "true"
ifdef DARWIN ifdef DARWIN
sudo -E go test -v $(ALL_PACKAGES) sudo -E go test -v $(ALL_PACKAGES)
else else
go test $(FLAGS) $(ALL_PACKAGES) go test $(TEST_FLAGS) $(BUILD_FLAGS) $(ALL_PACKAGES)
endif endif
else else
go test $(FLAGS) $(ALL_PACKAGES) go test $(TEST_FLAGS) $(BUILD_FLAGS) $(ALL_PACKAGES)
endif endif
test-proc-run: test-proc-run:
go test $(FLAGS) $(PREFIX)/proc -run $(RUN) go test $(TEST_FLAGS) $(BUILD_FLAGS) $(PREFIX)/proc -run $(RUN)
test-integration-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.
先完成此消息的编辑!
想要评论请 注册