From e87fed0407a397f9bf6cab9feee4b418166b245f Mon Sep 17 00:00:00 2001 From: Dominic Della Valle Date: Mon, 12 Feb 2018 15:28:13 -0500 Subject: [PATCH] Add Cygwin awareness in make License: MIT Signed-off-by: Dominic Della Valle --- bin/Rules.mk | 4 ++++ bin/dist_get | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/Rules.mk b/bin/Rules.mk index 1a1dd79626e5..db682bcbcd17 100644 --- a/bin/Rules.mk +++ b/bin/Rules.mk @@ -16,7 +16,11 @@ PATH := $(realpath $(d)):$(PATH) $(TGTS_$(d)): rm -f $@$(binpostfix) +ifeq ($(OS),Windows_NT) + cp $^$(binpostfix) $@$(binpostfix) +else ln -s $(notdir $^)$(binpostfix) $@$(binpostfix) +endif bin/gx-v%: @echo "installing gx $(@:bin/gx-%=%)" diff --git a/bin/dist_get b/bin/dist_get index 1dfe9ce0d2c3..6577b44d208e 100755 --- a/bin/dist_get +++ b/bin/dist_get @@ -58,8 +58,9 @@ unarchive() { ua_outfile="$3" ua_distname="$4" ua_binpostfix="" + ua_os=$(uname -o) - if [ "$(uname -o)" = "Msys" ]; then + if [ "$ua_os" = "Msys" ] || [ "$ua_os" = "Cygwin" ] ; then ua_binpostfix=".exe" fi ua_outfile="$ua_outfile$ua_binpostfix"