Skip to content

Commit

Permalink
Make builds depend on go sources
Browse files Browse the repository at this point in the history
...so it rebuilds when the sources are newer than the compiled binary.
  • Loading branch information
cap10morgan committed Jun 24, 2019
1 parent ccae171 commit 646eb74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ FIRSTGOPATH = $(firstword $(subst :, ,$(GOPATH)))
jsmodules = ./frontend/jasons-game/node_modules
generated = network/messages.pb.go game/types.pb.go pb/jasonsgame/jasonsgame.pb.go frontend/jasons-game/src/js/frontend/remote/*_pb.*
packr = packrd/packed-packr.go main-packr.go
gosources = $(shell find . -path "./vendor/*" -prune -o -type f -name "*.go" -print)

all: frontend-build $(packr) build

Expand All @@ -34,7 +35,7 @@ $(FIRSTGOPATH)/bin/golangci-lint:
$(FIRSTGOPATH)/bin/gotestsum:
go get gotest.tools/gotestsum

bin/jasonsgame: $(generated) go.mod go.sum
bin/jasonsgame: $(gosources) $(generated) go.mod go.sum
mkdir -p bin
go build -tags=desktop -o ./bin/jasonsgame

Expand Down

0 comments on commit 646eb74

Please sign in to comment.