makefile: don't re-generate if unchanged
Use make targets to skip "go generate" invocations when unnecessary.
This commit is contained in:
parent
dfda88c305
commit
b54691e436
10
Makefile
10
Makefile
|
@ -2,11 +2,15 @@ SRHT_PATH?=/usr/lib/python3.10/site-packages/srht
|
|||
MODULE=todosrht/
|
||||
include ${SRHT_PATH}/Makefile
|
||||
|
||||
all: api
|
||||
|
||||
api:
|
||||
api/loaders/*_gen.go: api/loaders/generate.go api/loaders/gen go.sum
|
||||
cd api && go generate ./loaders
|
||||
|
||||
api/graph/api/generated.go: api/graph/schema.graphqls api/graph/generate.go go.sum
|
||||
cd api && go generate ./graph
|
||||
|
||||
api: api/graph/api/generated.go api/loaders/*_gen.go
|
||||
cd api && go build
|
||||
|
||||
all: api
|
||||
|
||||
.PHONY: all api
|
||||
|
|
Loading…
Reference in New Issue