Skip to content

Commit 6edd149

Browse files
committed
Makefile: keep "git" when bindir is execdir
For some reason there still are people who use the old style layout to put everything in $(bindir). The previous commit breaks the install for them, because it tries to unconditionally remove git from execdir and cp/ln from bindir --- oops. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4ecbc17 commit 6edd149

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1641,10 +1641,11 @@ ifneq (,$X)
16411641
endif
16421642
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
16431643
execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
1644-
{ $(RM) "$$execdir/git$X" && \
1644+
{ test "$$bindir/" = "$$execdir/" || \
1645+
{ $(RM) "$$execdir/git$X" && \
16451646
test -z "$(NO_CROSS_DIRECTORY_HARDLINKS)" && \
16461647
ln "$$bindir/git$X" "$$execdir/git$X" 2>/dev/null || \
1647-
cp "$$bindir/git$X" "$$execdir/git$X"; } && \
1648+
cp "$$bindir/git$X" "$$execdir/git$X"; } ; } && \
16481649
{ for p in $(BUILT_INS); do \
16491650
$(RM) "$$execdir/$$p" && \
16501651
ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \

0 commit comments

Comments
 (0)