diff options
author | Johannes 'fish' Ziemke <github@freigeist.org> | 2016-12-29 18:52:36 +0100 |
---|---|---|
committer | Johannes 'fish' Ziemke <github@freigeist.org> | 2016-12-29 18:52:36 +0100 |
commit | 2c5f17d4e7e6aee1685151529bfc8b833b248d7c (patch) | |
tree | c4c134e69247b9d41a78a68696893a694ea9938e | |
parent | 41271cd99cf6b3583cf27df85b1cc784c7eb2a21 (diff) | |
download | prometheus_node_collector-2c5f17d4e7e6aee1685151529bfc8b833b248d7c.tar.bz2 prometheus_node_collector-2c5f17d4e7e6aee1685151529bfc8b833b248d7c.tar.xz prometheus_node_collector-2c5f17d4e7e6aee1685151529bfc8b833b248d7c.zip |
Fix Makefile by using first element of GOPATH
If GOPATH includes multiple paths, running `make promu` would fail.
This fixes it by always using the first path.
-rw-r--r-- | Makefile | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -11,9 +11,10 @@ | |||
11 | # See the License for the specific language governing permissions and | 11 | # See the License for the specific language governing permissions and |
12 | # limitations under the License. | 12 | # limitations under the License. |
13 | 13 | ||
14 | GO ?= GO15VENDOREXPERIMENT=1 go | 14 | GO ?= GO15VENDOREXPERIMENT=1 go |
15 | PROMU ?= $(GOPATH)/bin/promu | 15 | GOPATH := $(firstword $(subst :, ,$(GOPATH))) |
16 | pkgs = $(shell $(GO) list ./... | grep -v /vendor/) | 16 | PROMU ?= $(GOPATH)/bin/promu |
17 | pkgs = $(shell $(GO) list ./... | grep -v /vendor/) | ||
17 | 18 | ||
18 | PREFIX ?= $(shell pwd) | 19 | PREFIX ?= $(shell pwd) |
19 | BIN_DIR ?= $(shell pwd) | 20 | BIN_DIR ?= $(shell pwd) |