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:
parent
7c17d7400b
commit
8caad6ca3e
10
Makefile
10
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:
|
||||
|
Loading…
Reference in New Issue
Block a user