Skip to content

Commit

Permalink
Fix make gx binary names on Windows
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Dominic Della Valle <ddvpublic@gmail.com>
  • Loading branch information
djdv committed Feb 11, 2018
1 parent a0f65fd commit 7533699
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions bin/Rules.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
include mk/header.mk

dist_root_$(d)=/ipfs/QmT3CLJKJzWPuN4NAN4LLy69UpKskMF3AuYhXstKdn8V43
binpostfix :=
ifeq ($(OS),Windows_NT)
binpostfix = .exe
endif

$(d)/gx: $(d)/gx-v0.12.1
$(d)/gx-go: $(d)/gx-go-v1.6.0
Expand All @@ -11,8 +15,8 @@ DISTCLEAN += $(wildcard $(d)/gx-v*) $(wildcard $(d)/gx-go-v*) $(d)/tmp
PATH := $(realpath $(d)):$(PATH)

$(TGTS_$(d)):
rm -f $@
ln -s $(notdir $^) $@
rm -f $@$(binpostfix)
ln -s $(notdir $^)$(binpostfix) $@$(binpostfix)

bin/gx-v%:
@echo "installing gx $(@:bin/gx-%=%)"
Expand Down
8 changes: 6 additions & 2 deletions mk/gx.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
gx-path = gx/ipfs/$(shell gx deps find $(1))/$(1)
binpostfix :=
ifeq ($(OS),Windows_NT)
binpostfix = .exe
endif
gx-path = gx/ipfs/$(shell gx$(binpostfix) deps find $(1))/$(1)

gx-deps:
gx install --global
gx$(binpostfix) install --global
.PHONY: gx-deps

ifneq ($(IPFS_GX_USE_GLOBAL),1)
Expand Down

0 comments on commit 7533699

Please sign in to comment.