github.com/pachyderm/pachyderm@v1.13.4/etc/govars.mk (about) 1 # This is the make version of govars.sh. It defines several common env variables 2 # used by Pachyderm Makefiles (GOPATH, GOBIN, and PACHCTL), both so that other 3 # Makefiles can be simplified by assuming these variables are set (after 4 # including this file) and so that those scripts work correctly on a variety of 5 # different platforms (Linux, Darwin, Windows) and in a variety of different 6 # workflows. All variables assigned here use ?= so that they can be overridden 7 # by environment variables/other Makefiles 8 9 export GOPATH ?= $(shell go env GOPATH) 10 11 # Set GOBIN based on GOPATH 12 # TODO(msteffen) As of Apr. 2021, 'go env GOBIN' doesn't always return a path, 13 # but if that changes this should probably use 'go env GOBIN'. 14 export GOBIN ?= $(GOPATH)/bin 15 16 # Set PACHCTL based on GOBIN (want compiled pachctl to override system 17 # pachctl, if any) 18 ifeq ($(OS),Windows_NT) 19 export PACHCTL ?= $(shell cygpath -u $(GOBIN)/pachctl) 20 else 21 export PACHCTL ?= $(GOBIN)/pachctl 22 endif