From 4b1c6cd8e5745a945df0f72233964f6aede8a3a6 Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 17 Apr 2023 16:46:25 +0200 Subject: [PATCH] Make HAS_GO a simply expanded variable (#24169) Avoid recursive expansion on this variable and simplify the value. [Reference](https://www.gnu.org/software/make/manual/html_node/Setting.html). --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index eb48766194f1..59cc27ee8a10 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ IMPORT := code.gitea.io/gitea GO ?= go SHASUM ?= shasum -a 256 -HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" ) +HAS_GO := $(shell hash $(GO) > /dev/null 2>&1 && echo yes) COMMA := , XGO_VERSION := go-1.20.x @@ -41,7 +41,7 @@ DOCKER_IMAGE ?= gitea/gitea DOCKER_TAG ?= latest DOCKER_REF := $(DOCKER_IMAGE):$(DOCKER_TAG) -ifeq ($(HAS_GO), GO) +ifeq ($(HAS_GO), yes) GOPATH ?= $(shell $(GO) env GOPATH) export PATH := $(GOPATH)/bin:$(PATH)