From 9052ec62d6048b5e17be2bc145eb97579d81adb7 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 17 Oct 2022 21:58:50 +0300 Subject: [PATCH] [#285] Makefile: Install neo-go in the current directory `go install` doesn't have `-o` flag but it respects `GOBIN` environment variable. Signed-off-by: Evgenii Stratonikov --- .gitignore | 1 + Makefile | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 127abf6..0b93b2e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ config.json /vendor/ .idea +/bin/ diff --git a/Makefile b/Makefile index b934ca7..22d0dc0 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,9 @@ #!/usr/bin/make -f SHELL=bash -GOBIN ?= $(shell go env GOPATH)/bin +# GOBIN is used only to install neo-go and allows to override +# the location of written binary. +export GOBIN ?= $(shell pwd)/bin NEOGO ?= $(GOBIN)/cli VERSION ?= $(shell git describe --tags --dirty --match "v*" --always --abbrev=8 2>/dev/null || cat VERSION 2>/dev/null || echo "develop") @@ -45,6 +47,7 @@ test: clean: find . -name '*.nef' -exec rm -rf {} \; find . -name 'config.json' -exec rm -rf {} \; + rm -rf ./bin/ mr_proper: clean for sc in $(alphabet_sc); do\