diff options
| author | Joseph Richey <joerichey94@gmail.com> | 2018-02-13 04:48:14 -0800 |
|---|---|---|
| committer | Joseph Richey <joerichey94@gmail.com> | 2018-02-13 04:48:14 -0800 |
| commit | 3326520d48c6fd4b65c5b9d19f7eb8a005f6b943 (patch) | |
| tree | ff6fc28addf736448b8d41b2b27e7075ab0558bf /Makefile | |
| parent | e131cec6ef8554d394a2fe9d8bd85498b1703d7a (diff) | |
Makefile: Fix archetecture detection
Using "arch" instead of "go env GOARCH" is more standard and doesn't
generate a warning on "sudo make install".
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -181,16 +181,16 @@ $(BIN)/gocovmerge: $(VENDOR) # Non-go tools downloaded from appropriate repository PROTOC_VERSION := 3.5.1 -GOARCH := $(shell go env GOARCH) -ifneq ($(findstring amd64,$(GOARCH)),) -ARCH := x86_64 -else ifneq ($(findstring 386,$(GOARCH)),) -ARCH := x86_32 -else ifneq ($(findstring arm64,$(GOARCH)),) -ARCH := aarch_64 +ARCH := $(shell arch) +ifeq (x86_64,$(ARCH)) +PROTOC_ARCH := x86_64 +else ifneq ($(filter i386 i686,$(ARCH)),) +PROTOC_ARCH := x86_32 +else ifneq ($(filter aarch64 aarch64_be armv8b armv8l,$(ARCH)),) +PROTOC_ARCH := aarch_64 endif -ifdef ARCH -PROTOC_URL := https://github.com/google/protobuf/releases/download/v$(PROTOC_VERSION)/protoc-$(PROTOC_VERSION)-linux-$(ARCH).zip +ifdef PROTOC_ARCH +PROTOC_URL := https://github.com/google/protobuf/releases/download/v$(PROTOC_VERSION)/protoc-$(PROTOC_VERSION)-linux-$(PROTOC_ARCH).zip $(BIN)/protoc: wget -q $(PROTOC_URL) -O /tmp/protoc.zip unzip -q -j /tmp/protoc.zip bin/protoc -d $(BIN) |