Makefile: Use GO variable to specify compiler path
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 <kacper@kolodziej.it>
This commit is contained in:
parent
ec0e0f9d75
commit
6c0f228451
1 changed files with 2 additions and 1 deletions
3
Makefile
3
Makefile
|
@ -10,13 +10,14 @@ _INSTDIR=$(DESTDIR)$(PREFIX)
|
||||||
BINDIR?=$(_INSTDIR)/bin
|
BINDIR?=$(_INSTDIR)/bin
|
||||||
SHAREDIR?=$(_INSTDIR)/share/aerc
|
SHAREDIR?=$(_INSTDIR)/share/aerc
|
||||||
MANDIR?=$(_INSTDIR)/share/man
|
MANDIR?=$(_INSTDIR)/share/man
|
||||||
|
GO?=go
|
||||||
GOFLAGS?=
|
GOFLAGS?=
|
||||||
|
|
||||||
GOSRC!=find . -name '*.go'
|
GOSRC!=find . -name '*.go'
|
||||||
GOSRC+=go.mod go.sum
|
GOSRC+=go.mod go.sum
|
||||||
|
|
||||||
aerc: $(GOSRC)
|
aerc: $(GOSRC)
|
||||||
go build $(GOFLAGS) \
|
$(GO) build $(GOFLAGS) \
|
||||||
-ldflags "-X main.Prefix=$(PREFIX) \
|
-ldflags "-X main.Prefix=$(PREFIX) \
|
||||||
-X main.ShareDir=$(SHAREDIR) \
|
-X main.ShareDir=$(SHAREDIR) \
|
||||||
-X main.Version=$(VERSION)" \
|
-X main.Version=$(VERSION)" \
|
||||||
|
|
Loading…
Reference in a new issue