fix(Makefile): remove obsolete bin steps

This commit is contained in:
Markus Pesch 2022-03-11 10:28:30 +01:00
parent 2ee2ad9033
commit 268197aa9e
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982

View File

@ -7,32 +7,18 @@ 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