forked from TrueCloudLab/neoneo-go
Makefile: alias build
target
Follow the https://github.com/nspcc-dev/neo-go/pull/2537#issuecomment-1147468063.
This commit is contained in:
parent
de6cdb6d5a
commit
62e7d964da
1 changed files with 6 additions and 5 deletions
11
Makefile
11
Makefile
|
@ -1,7 +1,8 @@
|
|||
BRANCH = "master"
|
||||
REPONAME = "neo-go"
|
||||
NETMODE ?= "privnet"
|
||||
BINARY=./bin/neo-go$(shell go env GOEXE)
|
||||
BINARY=neo-go
|
||||
BINARY_PATH=./bin/$(BINARY)$(shell go env GOEXE)
|
||||
DESTDIR = ""
|
||||
SYSCONFIGDIR = "/etc"
|
||||
BINDIR = "/usr/bin"
|
||||
|
@ -22,7 +23,7 @@ IMAGE_REPO=nspccdev/neo-go
|
|||
|
||||
# All of the targets are phony here because we don't really use make dependency
|
||||
# tracking for files
|
||||
.PHONY: build bin deps image image-latest image-push image-push-latest check-version clean-cluster push-tag \
|
||||
.PHONY: build $(BINARY) deps image image-latest image-push image-push-latest check-version clean-cluster push-tag \
|
||||
test vet lint fmt cover
|
||||
|
||||
build: deps
|
||||
|
@ -30,9 +31,9 @@ build: deps
|
|||
@set -x \
|
||||
&& export GOGC=off \
|
||||
&& export CGO_ENABLED=0 \
|
||||
&& go build -trimpath -v -ldflags $(BUILD_FLAGS) -o ${BINARY} ./cli/main.go
|
||||
&& go build -trimpath -v -ldflags $(BUILD_FLAGS) -o ${BINARY_PATH} ./cli/main.go
|
||||
|
||||
bin: build
|
||||
$(BINARY): build
|
||||
|
||||
neo-go.service: neo-go.service.template
|
||||
@sed -r -e 's_BINDIR_$(BINDIR)_' -e 's_UNITWORKDIR_$(UNITWORKDIR)_' -e 's_SYSCONFIGDIR_$(SYSCONFIGDIR)_' $< >$@
|
||||
|
@ -45,7 +46,7 @@ install: build neo-go.service
|
|||
&& cp ./config/protocol.mainnet.yml $(DESTDIR)$(SYSCONFIGDIR)/neo-go \
|
||||
&& cp ./config/protocol.privnet.yml $(DESTDIR)$(SYSCONFIGDIR)/neo-go \
|
||||
&& cp ./config/protocol.testnet.yml $(DESTDIR)$(SYSCONFIGDIR)/neo-go \
|
||||
&& install -m 0755 -t $(BINDIR) $(BINARY) \
|
||||
&& install -m 0755 -t $(BINDIR) $(BINARY_PATH) \
|
||||
|
||||
postinst: install
|
||||
@echo "=> Preparing directories and configs"
|
||||
|
|
Loading…
Reference in a new issue