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 <ebb9@byu.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Eric Blake committed
Apr 28, 2009 at 06:28 UTC
d4b190271549c0b3f036884092b973696a34ea3a
1 file changed
+1
-1
Makefile
+1
-1
@@ -1544,7 +1544,7 @@ ifndef NO_TCLTK
1544
$(MAKE) -C git-gui gitexecdir='$(gitexec_instdir_SQ)' install
1545
endif
1546
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';)
1548
endif
1549
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
1550
execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \