Skip to content

Commit 0d768f7

Browse files
ebblakegitster
authored andcommitted
Makefile: building 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. Signed-off-by: Eric Blake <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cb3a160 commit 0d768f7

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
@@ -1064,7 +1064,7 @@ SHELL = $(SHELL_PATH)
10641064

10651065
all:: shell_compatibility_test $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS
10661066
ifneq (,$X)
1067-
$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), $(RM) '$p';)
1067+
$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test '$p' -ef '$p$X' || $(RM) '$p';)
10681068
endif
10691069

10701070
all::

0 commit comments

Comments
 (0)