From 252ec3909afb83534df03ae474fc92cbdd9e6c2c Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Sat, 25 Feb 2023 08:17:58 +0100 Subject: [PATCH] Add correct dependency on job.db in Makefile --- Makefile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 40af0e1..ff32c6c 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ TARGET = ./cc-backend VAR = ./var +DB = ./var/job.db FRONTEND = ./web/frontend VERSION = 0.1 GIT_HASH := $(shell git rev-parse --short HEAD || echo 'development') @@ -27,10 +28,9 @@ SVELTE_SRC = $(wildcard $(FRONTEND)/src/*.svelte) \ .NOTPARALLEL: -$(TARGET): $(VAR) $(SVELTE_TARGETS) +$(TARGET): $(VAR) $(DB) $(SVELTE_TARGETS) $(info ===> BUILD cc-backend) @go build -ldflags=${LD_FLAGS} ./cmd/cc-backend - ./cc-backend --migrate-db clean: $(info ===> CLEAN) @@ -43,10 +43,13 @@ test: @go vet ./... @go test ./... -$(SVELTE_TARGETS): $(SVELTE_SRC) - $(info ===> BUILD frontend) - cd web/frontend && yarn build - $(VAR): @mkdir $(VAR) cd web/frontend && yarn install + +$(DB): + ./cc-backend --migrate-db + +$(SVELTE_TARGETS): $(SVELTE_SRC) + $(info ===> BUILD frontend) + cd web/frontend && yarn build