From e4a49f1a712c0000ad192856d13247590a2c0ffc Mon Sep 17 00:00:00 2001 From: Ben Kochie Date: Fri, 30 Nov 2018 16:20:50 +0100 Subject: [PATCH] Update Makefile.common (#4932) * Fixup PROMU unpack When setting up promu, use an explicit path, not the `PROMU` variable. This allows for Makefile override of the PROMU command line flags. * Use temp dir for unpacking tools. * Use BSD compatible tar command. * OpenBSD mkdir doesn't support `-v`. Signed-off-by: Ben Kochie --- Makefile.common | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile.common b/Makefile.common index 741579e60f..8e135c5545 100644 --- a/Makefile.common +++ b/Makefile.common @@ -175,9 +175,11 @@ common-docker-tag-latest: promu: $(PROMU) $(PROMU): - curl -s -L $(PROMU_URL) | tar -xvz -C /tmp - mkdir -v -p $(FIRST_GOPATH)/bin - cp -v /tmp/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM)/promu $(PROMU) + $(eval PROMU_TMP := $(shell mktemp -d)) + curl -s -L $(PROMU_URL) | tar -xvzf - -C $(PROMU_TMP) + mkdir -p $(FIRST_GOPATH)/bin + cp $(PROMU_TMP)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM)/promu $(FIRST_GOPATH)/bin/promu + rm -r $(PROMU_TMP) .PHONY: proto proto: