提交 ef97af68 编写于 作者: martianzhang's avatar martianzhang

compatible with go 1.16

上级 c7e846e9
......@@ -5,7 +5,7 @@
#
BINARY=soar
GOPATH ?= $(shell go env GOPATH)
GO111MODULE:=off
GO111MODULE:=auto
export GO111MODULE
# Ensure GOPATH is set before running build process.
ifeq "$(GOPATH)" ""
......@@ -117,7 +117,7 @@ build: fmt
@mkdir -p bin
@ret=0 && for d in $$(go list -f '{{if (eq .Name "main")}}{{.ImportPath}}{{end}}' ./...); do \
b=$$(basename $${d}) ; \
GO111MODULE=auto go build ${LDFLAGS} ${GCFLAGS} -o bin/$${b} $$d || ret=$$? ; \
go build ${LDFLAGS} ${GCFLAGS} -o bin/$${b} $$d || ret=$$? ; \
done ; exit $$ret
@echo "build Success!"
......@@ -182,7 +182,7 @@ release: build
for d in $$(go list -f '{{if (eq .Name "main")}}{{.ImportPath}}{{end}}' ./...); do \
b=$$(basename $${d}) ; \
echo "Building $${b}.$${GOOS}-$${GOARCH} ..."; \
GO111MODULE=auto CGO_ENABLED=0 GOOS=$${GOOS} GOARCH=$${GOARCH} go build ${GCFLAGS} ${LDFLAGS} -v -o release/$${b}.$${GOOS}-$${GOARCH} $$d 2>/dev/null ; \
CGO_ENABLED=0 GOOS=$${GOOS} GOARCH=$${GOARCH} go build ${GCFLAGS} ${LDFLAGS} -v -o release/$${b}.$${GOOS}-$${GOARCH} $$d 2>/dev/null ; \
done ; \
done ;\
done
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册