Skip to content

Commit 01b7ede

Browse files
committed
Makefile: inline some variables
1 parent b730bd3 commit 01b7ede

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

Makefile

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,21 @@ export GOPATH
66
GO := $(CURDIR)/script/go
77
GOFMT := $(CURDIR)/script/gofmt
88

9-
BIN := bin
10-
119
GOFLAGS := \
1210
--tags "static" \
1311
-ldflags "-X main.BuildVersion=$(shell git rev-parse HEAD) -X main.BuildDescribe=$(shell git describe --tags --always --dirty)"
14-
GO_CMDS := $(BIN)/git-sizer
1512
GO_PKGS := $(shell cd .gopath/src && find github.com/github/git-sizer/ -type f -name '*.go' | xargs -n1 dirname | grep -v '^github.com/github/git-sizer/vendor/' | sort -u)
1613
GO_SRCS := $(shell find . -type f -name '*.go' | grep -v '^\./vendor/' | sort -u)
1714

1815
.PHONY: all
19-
all: $(GO_CMDS)
20-
21-
$(BIN)/%: $(GO_SRCS) | $(BIN)
22-
$(GO) build $(GOFLAGS) -o $@ $(PACKAGE)/$*
16+
all: bin/git-sizer
2317

24-
$(BIN):
25-
mkdir -p $(BIN)
18+
bin/git-sizer: $(GO_SRCS)
19+
mkdir -p bin
20+
$(GO) build $(GOFLAGS) -o $@ $(PACKAGE)/git-sizer
2621

2722
.PHONY: test
28-
test: $(GO_CMDS) gotest
23+
test: bin/git-sizer gotest
2924

3025
.PHONY: gotest
3126
gotest:

0 commit comments

Comments
 (0)