Skip to content

Commit c74102e

Browse files
committed
Add Cygwin awareness in make
License: MIT Signed-off-by: Dominic Della Valle <[email protected]>
1 parent 7533699 commit c74102e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

bin/Rules.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@ DISTCLEAN += $(wildcard $(d)/gx-v*) $(wildcard $(d)/gx-go-v*) $(d)/tmp
1515
PATH := $(realpath $(d)):$(PATH)
1616

1717
$(TGTS_$(d)):
18+
1819
rm -f $@$(binpostfix)
20+
ifeq ($(OS),Windows_NT)
21+
cp $^$(binpostfix) $@$(binpostfix)
22+
else
1923
ln -s $(notdir $^)$(binpostfix) $@$(binpostfix)
24+
endif
2025

2126
bin/gx-v%:
2227
@echo "installing gx $(@:bin/gx-%=%)"

bin/dist_get

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ unarchive() {
5858
ua_outfile="$3"
5959
ua_distname="$4"
6060
ua_binpostfix=""
61+
ua_os=$(uname -o)
6162

62-
if [ "$(uname -o)" = "Msys" ]; then
63+
if [ "$ua_os" = "Msys" ] || [ "$ua_os" = "Cygwin" ] ; then
6364
ua_binpostfix=".exe"
6465
fi
6566
ua_outfile="$ua_outfile$ua_binpostfix"

0 commit comments

Comments
 (0)