Made a new target to generate templates only when they are missing. Also put go install jade in it. Hence, no need in check in the PKGBUILD.
This commit is contained in:
parent
21d05e7488
commit
9c5bad04d4
7
Makefile
7
Makefile
@ -9,17 +9,18 @@ VERSION=23.21.0
|
||||
|
||||
LDFLAGS=-ldflags "-s -w -X main.version=${VERSION}" -tags osusergo,netgo
|
||||
|
||||
all: ${TARGET}
|
||||
all: web/*.jade.go ${TARGET}
|
||||
|
||||
.PHONY: ${TARGET}
|
||||
|
||||
${TARGET}:
|
||||
go generate web/web.go
|
||||
go build -o bin/$@ ${LDFLAGS} cmd/$@/main.go
|
||||
go build -o bin/$@-clean ${LDFLAGS} cmd/$@-clean/main.go
|
||||
|
||||
install-jade:
|
||||
web/*.jade.go:
|
||||
go install github.com/Joker/jade/cmd/jade@latest
|
||||
go generate web/web.go
|
||||
|
||||
|
||||
install:
|
||||
install -Dm 0755 bin/${TARGET} ${DESTDIR}usr/bin/${TARGET}
|
||||
|
@ -17,10 +17,6 @@ build() {
|
||||
|
||||
export GOPATH="$srcdir"/gopath
|
||||
|
||||
if [ ! -f "$(go env GOPATH)/bin/jade" ]; then
|
||||
make DESTDIR="$pkgdir/" install-jade
|
||||
fi
|
||||
|
||||
make VERSION=$pkgver DESTDIR="$pkgdir/"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user