Skip to content

Commit d4b1902

Browse files
ebblakegitster
authored andcommitted
Makefile: installing git in cygwin 1.7.0
On platforms with $X, make removes any leftover scripts 'a' from earlier builds if a new binary 'a.exe' is now built. However, on cygwin 1.7.0, 'git' and 'git.exe' now consistently name the same file. Test for file equality before attempting a remove, in order to avoid nuking just-built binaries. This repeats commit 0d768f7 for the installation destdir. Signed-off-by: Eric Blake <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b79376c commit d4b1902

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1544,7 +1544,7 @@ ifndef NO_TCLTK
15441544
$(MAKE) -C git-gui gitexecdir='$(gitexec_instdir_SQ)' install
15451545
endif
15461546
ifneq (,$X)
1547-
$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), $(RM) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p';)
1547+
$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p' -ef '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p$X' || $(RM) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p';)
15481548
endif
15491549
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
15501550
execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \

0 commit comments

Comments
 (0)