From 8caad6ca3e2c52517d1ea293827a5bf7f7bf3227 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sat, 23 Sep 2023 04:03:28 +0400 Subject: [PATCH] In Makefile fixed .PHONY and ${TARGET}. In a web/*.pug.go target added ifeq to check if jade compiler is already installed. --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index e0f8c32..a4f63e9 100755 --- a/Makefile +++ b/Makefile @@ -9,15 +9,15 @@ VERSION=23.32.0 FLAGS:=-buildmode=pie -modcacherw -mod=readonly -trimpath LDFLAGS=-ldflags "-s -w -X main.version=${VERSION}" -tags osusergo,netgo -all: web/*.pug.go ${TARGET} +.PHONY: run install uninstall clean -.PHONY: ${TARGET} - -${TARGET}: - go build -o bin/$@ ${LDFLAGS} cmd/$@/main.go +${TARGET}: web/*.pug.go + go build -o bin/$@ ${LDFLAGS} ${FLAGS} cmd/$@/main.go web/*.pug.go: web/templates/*.pug +ifeq (,$(wildcard $(shell go env GOPATH)/bin/jade)) go install github.com/Joker/jade/cmd/jade@latest +endif go generate web/web.go run: