From: Eric Blake Date: Tue, 28 Apr 2009 12:28:31 +0000 (-0600) Subject: Makefile: installing git in cygwin 1.7.0 X-Git-Tag: v1.6.3-rc4~13 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d4b190271549c0b3f036884092b973696a34ea3a;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/Makefile b/Makefile index 8b220ada7..6b80f81d6 100644 --- a/Makefile +++ b/Makefile @@ -1544,7 +1544,7 @@ ifndef NO_TCLTK $(MAKE) -C git-gui gitexecdir='$(gitexec_instdir_SQ)' install endif ifneq (,$X) - $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), $(RM) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p';) + $(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';) endif bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \ execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \