makefile: don't re-generate if unchanged

Use make targets to skip "go generate" invocations when unnecessary.
This commit is contained in:
Simon Ser 2024-01-31 11:36:17 +01:00
parent 237aa3712e
commit a785075776
1 changed files with 5 additions and 1 deletions

View File

@ -4,9 +4,13 @@ include ${SRHT_PATH}/Makefile
all: api gitsrht-dispatch gitsrht-keys gitsrht-shell gitsrht-update-hook
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
gitsrht-dispatch: