Skip to content

Commit

Permalink
wip tools change
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jakub Sztandera <[email protected]>
  • Loading branch information
Kubuxu committed Mar 3, 2019
1 parent f2fad9d commit e5151d6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cmd/ipfs/Rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
6 changes: 5 additions & 1 deletion mk/golang.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions test/bin/Rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit e5151d6

Please sign in to comment.