File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,12 @@ DISTCLEAN += $(wildcard $(d)/gx-v*) $(wildcard $(d)/gx-go-v*) $(d)/tmp
11
11
PATH := $(realpath $(d ) ) :$(PATH )
12
12
13
13
$(TGTS_$(d ) ) :
14
- rm -f $@
14
+ rm -f $@ $(?exe )
15
+ ifeq ($(WINDOWS ) ,1)
16
+ cp $^$(?exe) $@$(?exe)
17
+ else
15
18
ln -s $(notdir $^) $@
19
+ endif
16
20
17
21
bin/gx-v% :
18
22
@echo " installing gx $( @:bin/gx-%=%) "
Original file line number Diff line number Diff line change @@ -57,6 +57,13 @@ unarchive() {
57
57
ua_infile=" $2 "
58
58
ua_outfile=" $3 "
59
59
ua_distname=" $4 "
60
+ ua_binpostfix=" "
61
+ ua_os=$( uname -o)
62
+
63
+ if [ " $ua_os " = " Msys" ] || [ " $ua_os " = " Cygwin" ] ; then
64
+ ua_binpostfix=" .exe"
65
+ fi
66
+ ua_outfile=" $ua_outfile$ua_binpostfix "
60
67
61
68
if ! check_writeable " $ua_outfile " ; then
62
69
die " unarchive error: cannot write to $ua_outfile "
@@ -66,7 +73,7 @@ unarchive() {
66
73
tar.gz)
67
74
if have_binary tar; then
68
75
echo " ==> using 'tar' to extract binary from archive"
69
- < " $ua_infile " tar -Ozxf - " $ua_distname /$ua_distname " > " $ua_outfile " \
76
+ < " $ua_infile " tar -Ozxf - " $ua_distname /$ua_distname$ua_binpostfix " > " $ua_outfile " \
70
77
|| die " tar has failed"
71
78
else
72
79
die " no binary on system for extracting tar files"
@@ -75,7 +82,7 @@ unarchive() {
75
82
zip)
76
83
if have_binary unzip; then
77
84
echo " ==> using 'unzip' to extract binary from archive"
78
- unzip -p " $ua_infile " " $ua_distname /$ua_distname " > " $ua_outfile " \
85
+ unzip -p " $ua_infile " " $ua_distname /$ua_distname$ua_binpostfix " > " $ua_outfile " \
79
86
|| die " unzip has failed"
80
87
else
81
88
die " no installed method for extracting .zip archives"
You can’t perform that action at this time.
0 commit comments