From 077e6682fa96f16912f6b650ed54d3d74c4c349d Mon Sep 17 00:00:00 2001 From: ffranr Date: Tue, 30 Jul 2024 00:44:47 +0100 Subject: [PATCH] Makefile: rename variable to `ACTIVE_GO_VERSION` Renamed the Makefile variable `GO_VERSION` to `ACTIVE_GO_VERSION` for improved clarity. This change also frees up the name `GO_VERSION` to be used for defining the global Go version for reproducible binaries in a subsequent commit. --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5ea087892..cb5d43e02 100644 --- a/Makefile +++ b/Makefile @@ -23,11 +23,12 @@ ANDROID_BUILD := $(ANDROID_BUILD_DIR)/Lndmobile.aar COMMIT := $(shell git describe --tags --dirty) -GO_VERSION := $(shell go version | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p') -GO_VERSION_MINOR := $(shell echo $(GO_VERSION) | cut -d. -f2) +# Determine the minor version of the active Go installation. +ACTIVE_GO_VERSION := $(shell go version | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p') +ACTIVE_GO_VERSION_MINOR := $(shell echo $(ACTIVE_GO_VERSION) | cut -d. -f2) LOOPVARFIX := -ifeq ($(shell expr $(GO_VERSION_MINOR) \>= 21), 1) +ifeq ($(shell expr $(ACTIVE_GO_VERSION_MINOR) \>= 21), 1) LOOPVARFIX := GOEXPERIMENT=loopvar endif