From 6425370649e9429575cc5334ad0a1a9d28c41b70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wilson=20J=C3=BAnior?= Date: Thu, 14 Nov 2024 17:40:20 -0300 Subject: [PATCH] Fix make install on arm machines --- GNUmakefile | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index ae1f4cd..a8742de 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -3,7 +3,32 @@ NAMESPACE=tsuru NAME=rpaas BINARY=terraform-provider-${NAME} VERSION=$(shell git describe --tags $(git rev-list --tags --max-count=1) | tr -d v) -OS_ARCH=$(shell go env GOOS)_$(shell go env GOARCH) +UNAME_S := $(shell uname -s) +UNAME_P := $(shell uname -p) +ifeq ($(UNAME_S),Linux) + OS := linux + UNAME_P := $(shell uname -m) +endif +ifeq ($(UNAME_S),Darwin) + OS := darwin + UNAME_P := $(shell uname -m) +endif + +ifeq ($(UNAME_P),x86_64) + ARCH := amd64 +endif + +ifneq ($(filter %86,$(UNAME_P)),) + ARCH := 386 +endif +ifneq ($(filter arm%,$(UNAME_P)),) + ARCH := arm +endif +ifeq ($(UNAME_P),arm64) + ARCH := arm64 +endif + +OS_ARCH=${OS}_${ARCH} TFPLUGINDOCS_VERSION ?= v0.16.0