1
0

Made a ${TARGET} target dependable on a web/*.pug.go target. Also added ifeq ... endif check for jade compiler.

This commit is contained in:
Alexander Andreev 2023-09-10 18:18:41 +04:00
parent 812d374354
commit cbf8eb8747
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -13,11 +13,13 @@ LDFLAGS:= -ldflags "-s -w -X main.version=${VERSION}" -tags osusergo,netgo
.PHONY: run install uninstall clean .PHONY: run install uninstall clean
${TARGET}: ${TARGET}: web/*.pug.go
go build -o bin/$@ ${LDFLAGS} ${FLAGS} cmd/$@/main.go go build -o bin/$@ ${LDFLAGS} ${FLAGS} cmd/$@/main.go
web/*.pug.go: web/templates/*.pug web/*.pug.go: web/templates/*.pug
ifeq (,$(wildcard $(shell go env GOPATH)/bin/jade))
go install github.com/Joker/jade/cmd/jade@latest go install github.com/Joker/jade/cmd/jade@latest
endif
go generate web/web.go go generate web/web.go
run: run: