From 6c0f228451c171f4901fa214dd8252d2b22bceaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Ko=C5=82odziej?= Date: Sat, 20 Jul 2019 11:29:31 +0200 Subject: [PATCH] Makefile: Use GO variable to specify compiler path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is useful when somebody has different Go versions across one system and first go in $PATH points to version older than 1.12 (common in stable distributions). Signed-off-by: Kacper KoƂodziej --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6609640..4e76dcb 100644 --- a/Makefile +++ b/Makefile @@ -10,13 +10,14 @@ _INSTDIR=$(DESTDIR)$(PREFIX) BINDIR?=$(_INSTDIR)/bin SHAREDIR?=$(_INSTDIR)/share/aerc MANDIR?=$(_INSTDIR)/share/man +GO?=go GOFLAGS?= GOSRC!=find . -name '*.go' GOSRC+=go.mod go.sum aerc: $(GOSRC) - go build $(GOFLAGS) \ + $(GO) build $(GOFLAGS) \ -ldflags "-X main.Prefix=$(PREFIX) \ -X main.ShareDir=$(SHAREDIR) \ -X main.Version=$(VERSION)" \