From 0f6beb708e6e9df1ca13dda83cdf5568ad642d0f Mon Sep 17 00:00:00 2001 From: ramin Date: Tue, 20 Feb 2024 15:02:03 +0100 Subject: [PATCH] detect and default to make go-install on darwin vs the linux way in all other cases for refs #3169 --- Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a43c917345..f12c88e2c2 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ SHELL=/usr/bin/env bash PROJECTNAME=$(shell basename "$(PWD)") DIR_FULLPATH=$(shell pwd) versioningPath := "github.com/celestiaorg/celestia-node/nodebuilder/node" +OS := $(shell uname -s) LDFLAGS=-ldflags="-X '$(versioningPath).buildTime=$(shell date)' -X '$(versioningPath).lastCommit=$(shell git rev-parse HEAD)' -X '$(versioningPath).semanticVersion=$(shell git describe --tags --dirty=-dev 2>/dev/null || git rev-parse --abbrev-ref HEAD)'" TAGS=integration SHORT= @@ -65,9 +66,20 @@ deps: ## install: Install all build binaries into the $PREFIX (/usr/local/ by default) directory. install: + @$(MAKE) detect-install +.PHONY: install + +detect-install: +ifeq ($(OS),Darwin) + @$(MAKE) go-install +else + @$(MAKE) install-global +endif + +install-global: @echo "--> Installing Celestia" @install -v ./build/* -t ${PREFIX}/bin/ -.PHONY: install +.PHONY: install-global ## go-install: Build and install the celestia-node binary into the GOBIN directory. go-install: