Skip to content

Commit 7533699

Browse files
committed
Fix make gx binary names on Windows
License: MIT Signed-off-by: Dominic Della Valle <[email protected]>
1 parent a0f65fd commit 7533699

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

bin/Rules.mk

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
include mk/header.mk
22

33
dist_root_$(d)=/ipfs/QmT3CLJKJzWPuN4NAN4LLy69UpKskMF3AuYhXstKdn8V43
4+
binpostfix :=
5+
ifeq ($(OS),Windows_NT)
6+
binpostfix = .exe
7+
endif
48

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

1317
$(TGTS_$(d)):
14-
rm -f $@
15-
ln -s $(notdir $^) $@
18+
rm -f $@$(binpostfix)
19+
ln -s $(notdir $^)$(binpostfix) $@$(binpostfix)
1620

1721
bin/gx-v%:
1822
@echo "installing gx $(@:bin/gx-%=%)"

mk/gx.mk

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
gx-path = gx/ipfs/$(shell gx deps find $(1))/$(1)
1+
binpostfix :=
2+
ifeq ($(OS),Windows_NT)
3+
binpostfix = .exe
4+
endif
5+
gx-path = gx/ipfs/$(shell gx$(binpostfix) deps find $(1))/$(1)
26

37
gx-deps:
4-
gx install --global
8+
gx$(binpostfix) install --global
59
.PHONY: gx-deps
610

711
ifneq ($(IPFS_GX_USE_GLOBAL),1)

0 commit comments

Comments
 (0)