Skip to content

Commit 579e061

Browse files
authored
Stop being clever about when to rebuild (#95)
1 parent aac468e commit 579e061

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

Makefile

+4-8
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,18 @@ TOOL_BIN_DIR ?= $(shell go env GOPATH)/bin
1616
TOOL_GOLINT := $(TOOL_BIN_DIR)/golint
1717
TOOL_STATICCHECK := $(TOOL_BIN_DIR)/staticcheck
1818

19-
GO_SOURCES = $(shell find . -name *.go)
20-
2119

2220
# =============================================================================
2321
# build
2422
# =============================================================================
25-
build: $(DIST_PATH)/go-httpbin
26-
27-
buildtests: $(DIST_PATH)/go-httpbin.test
28-
29-
$(DIST_PATH)/go-httpbin: $(GO_SOURCES)
23+
build:
3024
mkdir -p $(DIST_PATH)
3125
CGO_ENABLED=0 go build -ldflags="-s -w" -o $(DIST_PATH)/go-httpbin ./cmd/go-httpbin
26+
.PHONY: build
3227

33-
$(DIST_PATH)/go-httpbin.test: $(GO_SOURCES)
28+
buildtests:
3429
CGO_ENABLED=0 go test -ldflags="-s -w" -v -c -o $(DIST_PATH)/go-httpbin.test ./httpbin
30+
.PHONY: buildtests
3531

3632
clean:
3733
rm -rf $(DIST_PATH) $(COVERAGE_PATH)

0 commit comments

Comments
 (0)