From c4e309bf2f2d39e62f7e30f7637e164125ef3b8c Mon Sep 17 00:00:00 2001 From: Sam Therapy Date: Mon, 9 Jan 2023 18:57:14 +0100 Subject: [PATCH] fix(make): the stuff after the colon idk the name make it right Signed-off-by: Sam Therapy --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 50cb51c..c9fb2c4 100644 --- a/Makefile +++ b/Makefile @@ -2,19 +2,21 @@ CGO_ENABLED ?= 0 GOFLAGS ?= -trimpath -ldflags="-s -w" PROG ?= pomme +FRONTEND ?= frontend/build/index.html GO_SOURCES ?= $(shell find . -name "*.go" -type f ! -name '*_test*') GO_TEST_SOURCES ?= $(shell find . -name "*_test.go" -type f) -NODE_SOURCES ?= $(shell find ./frontend -type d \( -name node_modules -o -name .svelte-kit -o -name tests \) -prune -o -name '*.ts' -o -name '*.js' -o -name '*.html' -o -name '*.svelte' -o -name '*.json' -print) +NODE_SOURCES ?= $(shell find ./frontend -type d \( -name node_modules -o -name .svelte-kit -o -name tests -o -name build \) -prune -o \( -name '*.ts' -o -name '*.js' -o -name '*.html' -o -name '*.svelte' -o -name '*.json' \) -print) all: frontend backend .PHONY: frontend -frontend: $(NODE_SOURCES) +$(FRONTEND): $(NODE_SOURCES) pnpm -F frontend build +frontend: $(FRONTEND) .PHONY: backend -$(PROG): $(GO_SOURCES) +$(PROG): $(GO_SOURCES) $(NODE_SOURCES) go build $(GOFLAGS) ./cmd/pomme backend: $(PROG)