File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -6,14 +6,21 @@ export GOPATH
66GO := $(CURDIR ) /script/go
77GOFMT := $(CURDIR ) /script/gofmt
88
9- GOFLAGS := \
10- -ldflags "-X main.BuildVersion=$(shell git rev-parse HEAD) -X main.BuildDescribe=$(shell git describe --tags --always --dirty) "
9+ GO_LDFLAGS := -X main.BuildVersion=$(shell git rev-parse HEAD)
10+ GO_LDFLAGS += -X main.BuildDescribe=$(shell git describe --tags --always --dirty)
11+ GOFLAGS := -ldflags "$(GO_LDFLAGS ) "
1112
1213ifdef USE_ISATTY
1314GOFLAGS := $(GOFLAGS ) --tags isatty
1415endif
1516
16- GO_SRCS := $(shell cd $(GOPATH ) /src/$(PACKAGE ) && $(GO ) list -f '{{$$ip := .ImportPath}}{{range .GoFiles}}{{printf ".gopath/src/% s/% s\n" $$ip .}}{{end}}{{range .CgoFiles}}{{printf ".gopath/src/% s/% s\n" $$ip .}}{{end}}{{range .TestGoFiles}}{{printf ".gopath/src/% s/% s\n" $$ip .}}{{end}}{{range .XTestGoFiles}}{{printf ".gopath/src/% s/% s\n" $$ip .}}{{end}}' ./...)
17+ GO_SRCS := $(sort $(shell cd $(GOPATH ) /src/$(PACKAGE ) && $(GO ) list -f ' \
18+ {{$$ip := .ImportPath}} \
19+ {{range .GoFiles }}{{printf ".gopath/src/% s/% s\n" $$ip .}}{{end}} \
20+ {{range .CgoFiles }}{{printf ".gopath/src/% s/% s\n" $$ip .}}{{end}} \
21+ {{range .TestGoFiles }}{{printf ".gopath/src/% s/% s\n" $$ip .}}{{end}} \
22+ {{range .XTestGoFiles}}{{printf ".gopath/src/% s/% s\n" $$ip .}}{{end}} \
23+ ' ./...) )
1724
1825.PHONY : all
1926all : bin/git-sizer
@@ -94,6 +101,7 @@ govet:
94101clean :
95102 rm -rf bin
96103
104+ # List all of this project's Go sources, excluding vendor, within .gopath:
97105.PHONY : srcs
98106srcs :
99107 @printf " %s\n" $(GO_SRCS )
You can’t perform that action at this time.
0 commit comments