1
0
Fork 0

In Makefile fixed .PHONY and ${TARGET}. In a web/*.pug.go target added ifeq to check if jade compiler is already installed.

This commit is contained in:
Alexander Andreev 2023-09-23 04:03:28 +04:00
parent 7c17d7400b
commit 8caad6ca3e
Signed by: Arav
GPG Key ID: D22A817D95815393
1 changed files with 5 additions and 5 deletions

View File

@ -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: