Skip to content
Myr

Parse the output of `go version` to get the value of GOOS (#1260)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Akinori MUSHA · committed by Junegunn Choi · parent 851fa38 · Browse files · 1 file+1 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−8 removed

  • other:+1 added−8 removed

1 file+1 added−8 removed

modified:Makefile+1 added-8 removed
1ifndef GOOS2UNAME_S := $(shell uname -s)3ifeq ($(UNAME_S),Darwin)4 GOOS := darwin5else ifeq ($(UNAME_S),Linux)6 GOOS := linux7else8$(error "$$GOOS is not defined.")2GOOS := $(word 1, $(subst /, " ", $(word 4, $(shell go version))))3endif10endif45MAKEFILE := $(realpath $(lastword $(MAKEFILE_LIST)))6ROOT_DIR := $(shell dirname $(MAKEFILE))7GOPATH := $(ROOT_DIR)/gopath
124 unmodified lines