From 8b48dc57f91d044dc729db222bf1f8298b6d1e8e Mon Sep 17 00:00:00 2001 From: Eric Warehime Date: Thu, 5 May 2022 07:23:26 -0700 Subject: [PATCH] Move M1 config variables into configure_dev.sh --- Makefile | 7 ------- scripts/configure_dev.sh | 5 +++++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index f55089890c..90bcc70215 100644 --- a/Makefile +++ b/Makefile @@ -36,13 +36,6 @@ else export GOTESTCOMMAND=gotestsum --format pkgname --jsonfile testresults.json -- endif -# M1 Mac--homebrew install location in /opt/homebrew -ifeq ($(OS_TYPE), darwin) -ifeq ($(ARCH), arm64) -export CPATH=/opt/homebrew/include -export LIBRARY_PATH=/opt/homebrew/lib -endif -endif ifeq ($(UNAME), Linux) EXTLDFLAGS := -static-libstdc++ -static-libgcc ifeq ($(ARCH), amd64) diff --git a/scripts/configure_dev.sh b/scripts/configure_dev.sh index 6eb00df3d4..0af2798fee 100755 --- a/scripts/configure_dev.sh +++ b/scripts/configure_dev.sh @@ -28,6 +28,7 @@ done SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" OS=$("$SCRIPTPATH"/ostype.sh) +ARCH=$("$SCRIPTPATH"/archtype.sh) function install_or_upgrade { if ${FORCE} ; then @@ -72,6 +73,10 @@ if [ "${OS}" = "linux" ]; then sudo "$SCRIPTPATH/install_linux_deps.sh" fi elif [ "${OS}" = "darwin" ]; then + if [ "${ARCH}" = "arm64" ]; then + export CPATH=/opt/homebrew/include + export LIBRARY_PATH=/opt/homebrew/lib + fi if [ "${CIRCLECI}" != "true" ]; then brew update brew tap homebrew/cask