Made a ${TARGET} target dependable on a web/*.pug.go target. Also added ifeq ... endif check for jade compiler.
This commit is contained in:
parent
812d374354
commit
cbf8eb8747
4
Makefile
4
Makefile
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user