fix(Makefile): remove obsolete bin steps
This commit is contained in:
parent
2ee2ad9033
commit
268197aa9e
28
Makefile
28
Makefile
@ -1,38 +1,24 @@
|
|||||||
# VERSION
|
# VERSION
|
||||||
VERSION ?= $(shell git describe --abbrev=0)+hash.$(shell git rev-parse --short HEAD)
|
VERSION ?= $(shell git describe --abbrev=0)+hash.$(shell git rev-parse --short HEAD)
|
||||||
|
|
||||||
DESTDIR ?=
|
DESTDIR ?=
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
EXECUTABLE := dyndns-client
|
EXECUTABLE := dyndns-client
|
||||||
|
|
||||||
# BINARIES
|
# BINARIES
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
${EXECUTABLE}: clean bin/tmp/${EXECUTABLE}
|
all: ${EXECUTABLE}
|
||||||
|
|
||||||
bin/linux/amd64/$(EXECUTABLE):
|
${EXECUTABLE}:
|
||||||
CGO_ENABLED=0 \
|
CGO_ENABLED=0 \
|
||||||
GONOPROXY=$(shell go env GONOPROXY) \
|
|
||||||
GONOSUMDB=$(shell go env GONOSUMDB) \
|
|
||||||
GOPRIVATE=$(shell go env GOPRIVATE) \
|
GOPRIVATE=$(shell go env GOPRIVATE) \
|
||||||
GOPROXY=$(shell go env GOPROXY) \
|
GOPROXY=$(shell go env GOPROXY) \
|
||||||
GOSUMDB=$(shell go env GOSUMDB) \
|
|
||||||
GOOS=linux \
|
|
||||||
GOARCH=amd64 \
|
|
||||||
go build -ldflags "-X main.version=${VERSION:v%=%}" -o ${@}
|
|
||||||
|
|
||||||
bin/tmp/${EXECUTABLE}:
|
|
||||||
CGO_ENABLED=0 \
|
|
||||||
GONOPROXY=$(shell go env GONOPROXY) \
|
|
||||||
GONOSUMDB=$(shell go env GONOSUMDB) \
|
|
||||||
GOPRIVATE=$(shell go env GOPRIVATE) \
|
|
||||||
GOPROXY=$(shell go env GOPROXY) \
|
|
||||||
GOSUMDB=$(shell go env GOSUMDB) \
|
|
||||||
go build -ldflags "-X main.version=${VERSION:v%=%}" -o ${@}
|
go build -ldflags "-X main.version=${VERSION:v%=%}" -o ${@}
|
||||||
|
|
||||||
# TEST
|
# TEST
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
PHONY+=test
|
PHONY+=test
|
||||||
test: clean bin/tmp/${EXECUTABLE}
|
test: clean ${EXECUTABLE}
|
||||||
go test -v ./pkg/...
|
go test -v ./pkg/...
|
||||||
|
|
||||||
# CLEAN
|
# CLEAN
|
||||||
@ -45,9 +31,9 @@ clean:
|
|||||||
# UN/INSTALL
|
# UN/INSTALL
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
PHONY+=install
|
PHONY+=install
|
||||||
install: bin/tmp/${EXECUTABLE}
|
install: ${EXECUTABLE}
|
||||||
install --directory ${DESTDIR}${PREFIX}/bin
|
install --directory ${DESTDIR}${PREFIX}/bin
|
||||||
install --mode 755 bin/tmp/${EXECUTABLE} ${DESTDIR}${PREFIX}/bin/${EXECUTABLE}
|
install --mode 755 ${EXECUTABLE} ${DESTDIR}${PREFIX}/bin/${EXECUTABLE}
|
||||||
|
|
||||||
install --directory ${DESTDIR}/usr/lib/systemd/system
|
install --directory ${DESTDIR}/usr/lib/systemd/system
|
||||||
install --mode 644 systemd/${EXECUTABLE}.service ${DESTDIR}/usr/lib/systemd/system
|
install --mode 644 systemd/${EXECUTABLE}.service ${DESTDIR}/usr/lib/systemd/system
|
||||||
|
Loading…
Reference in New Issue
Block a user