Allow installing in the traditional way
authorJunio C Hamano <gitster@pobox.com>
Mon, 28 Jul 2008 07:05:10 +0000 (00:05 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 28 Jul 2008 20:09:54 +0000 (13:09 -0700)
In an earlier commit c70a8d9 (Makefile: Do not install a copy of 'git' in
$(gitexecdir), 2008-07-21), we tried to avoid installing two git, one in
/usr/bin/git and the other in /usr/libexec/git-core/git.  It mistakenly
removed the only copy of git when gitexecdir and bindir are set to the
same directory, i.e. the traditional layout.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile

index 7e30b30775786a438cd128b2fff74913ca2a2a9f..52c67c1a472455dcce5c19a21bbfd0520ff7dd26 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1362,7 +1362,10 @@ endif
                cp "$$bindir/git$X" "$$execdir/git$X"; \
        fi && \
        { $(foreach p,$(BUILT_INS), $(RM) "$$execdir/$p" && ln "$$execdir/git$X" "$$execdir/$p" ;) } && \
-       $(RM) "$$execdir/git$X" && \
+       if test "z$$bindir" != "z$$execdir"; \
+       then \
+               $(RM) "$$execdir/git$X"; \
+       fi && \
        ./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X"
 
 install-doc: