Skip to content

Commit

Permalink
Make HAS_GO a simply expanded variable (#24169)
Browse files Browse the repository at this point in the history
Avoid recursive expansion on this variable and simplify the value.
[Reference](https://www.gnu.org/software/make/manual/html_node/Setting.html).
  • Loading branch information
silverwind authored Apr 17, 2023
1 parent cda84be commit 4b1c6cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down

0 comments on commit 4b1c6cd

Please sign in to comment.