From e5151d62ee02006925926b307e8a6bcc8f2c560c Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Sun, 3 Mar 2019 18:49:13 +0100 Subject: [PATCH] wip tools change License: MIT Signed-off-by: Jakub Sztandera --- cmd/ipfs/Rules.mk | 2 +- mk/golang.mk | 6 +++++- test/bin/Rules.mk | 14 +++++++------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/cmd/ipfs/Rules.mk b/cmd/ipfs/Rules.mk index d693cd86b0de..2a768b5fc8a4 100644 --- a/cmd/ipfs/Rules.mk +++ b/cmd/ipfs/Rules.mk @@ -19,7 +19,7 @@ $(d)-try-build $(IPFS_BIN_$(d)): GOFLAGS += $(cmd/ipfs_flags) # uses second expansion to collect all $(DEPS_GO) $(IPFS_BIN_$(d)): $(d) $$(DEPS_GO) ALWAYS #| $(DEPS_OO_$(d)) - $(go-build) + $(go-build-relative) TRY_BUILD_$(d)=$(addprefix $(d)-try-build-,$(SUPPORTED_PLATFORMS)) $(d)-try-build: $(TRY_BUILD_$(d)) diff --git a/mk/golang.mk b/mk/golang.mk index 96a92b25c03e..0497e831bcca 100644 --- a/mk/golang.mk +++ b/mk/golang.mk @@ -26,7 +26,11 @@ go-tags=$(if $(GOTAGS), -tags="$(call join-with,$(space),$(GOTAGS))") go-flags-with-tags=$(GOFLAGS)$(go-tags) define go-build -$(GOCC) build -i $(go-flags-with-tags) -o "$@" "$(call go-pkg-name,$<)" +$(GOCC) build $(go-flags-with-tags) -o "$@" "$(1)" +endef + +define go-build-relative +$(GOCC) build $(go-flags-with-tags) -o "$@" "$(call go-pkg-name,$<)" endef define go-try-build diff --git a/test/bin/Rules.mk b/test/bin/Rules.mk index 7896d353da2f..5baaaebf5985 100644 --- a/test/bin/Rules.mk +++ b/test/bin/Rules.mk @@ -3,27 +3,27 @@ include mk/header.mk TGTS_$(d) := $(d)/pollEndpoint: thirdparty/pollEndpoint - $(go-build) + $(go-build-relative) TGTS_$(d) += $(d)/pollEndpoint $(d)/go-sleep: test/dependencies/go-sleep - $(go-build) + $(go-build-relative) TGTS_$(d) += $(d)/go-sleep $(d)/go-timeout: test/dependencies/go-timeout - $(go-build) + $(go-build-relative) TGTS_$(d) += $(d)/go-timeout $(d)/iptb: test/dependencies/iptb - $(go-build) + $(go-build-relative) TGTS_$(d) += $(d)/iptb $(d)/ma-pipe-unidir: test/dependencies/ma-pipe-unidir - $(go-build) + $(go-build-relative) TGTS_$(d) += $(d)/ma-pipe-unidir $(d)/json-to-junit: test/dependencies/json-to-junit - $(go-build) + $(go-build-relative) TGTS_$(d) += $(d)/json-to-junit TGTS_GX_$(d) := hang-fds @@ -36,7 +36,7 @@ TGTS_$(d) += $(TGTS_GX_$(d)) # multihash is special $(d)/multihash: - go build -i $(go-flags-with-tags) -o "$@" "gx/ipfs/$(shell gx deps find go-multihash)/go-multihash/multihash" + go buil -i $(go-flags-with-tags) -o "$@" "gx/ipfs/$(shell gx deps find go-multihash)/go-multihash/multihash" TGTS_$(d) += $(d)/multihash # cid-fmt is also special