Skip to content

Commit 27585c8

Browse files
committed
Makefile: simplify how GO_SRCS is initialized
1 parent 7c51c02 commit 27585c8

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@ GOFMT := $(CURDIR)/script/gofmt
99
GOFLAGS := \
1010
--tags "static" \
1111
-ldflags "-X main.BuildVersion=$(shell git rev-parse HEAD) -X main.BuildDescribe=$(shell git describe --tags --always --dirty)"
12-
GO_PKGS := $(PACKAGE) \
13-
$(PACKAGE)/isatty \
14-
$(PACKAGE)/meter \
15-
$(PACKAGE)/sizes
16-
GO_SRCS := $(shell $(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}}' $(GO_PKGS))
12+
13+
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}}' ./...)
1714

1815
.PHONY: all
1916
all: bin/git-sizer

0 commit comments

Comments
 (0)