summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-04-17 16:46:25 +0200
committerGitHub <noreply@github.com>2023-04-17 10:46:25 -0400
commit4b1c6cd8e5745a945df0f72233964f6aede8a3a6 (patch)
treedd368652ae4fa2c28fc78940b2aeb79531943029 /Makefile
parentcda84bec87f18fa5cbbbd62fc72bc3d997aba66c (diff)
downloadgitea-4b1c6cd8e5745a945df0f72233964f6aede8a3a6.tar.gz
gitea-4b1c6cd8e5745a945df0f72233964f6aede8a3a6.zip
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).
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index eb48766194..59cc27ee8a 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)