diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-07-10 20:17:33 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-07-10 20:17:33 -0700 |
commit | 6edd14968bf969a651d057ea7fb7757393d282bf (patch) | |
tree | 37175ae8b82a50fea3bd8305c2086ba32c99b78a /Makefile | |
parent | 4ecbc178704ca6c1027a38483e98f5fe493b1322 (diff) | |
download | git-6edd14968bf969a651d057ea7fb7757393d282bf.tar.gz |
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 <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1641,10 +1641,11 @@ ifneq (,$X) endif bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \ execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \ - { $(RM) "$$execdir/git$X" && \ + { test "$$bindir/" = "$$execdir/" || \ + { $(RM) "$$execdir/git$X" && \ test -z "$(NO_CROSS_DIRECTORY_HARDLINKS)" && \ ln "$$bindir/git$X" "$$execdir/git$X" 2>/dev/null || \ - cp "$$bindir/git$X" "$$execdir/git$X"; } && \ + cp "$$bindir/git$X" "$$execdir/git$X"; } ; } && \ { for p in $(BUILT_INS); do \ $(RM) "$$execdir/$$p" && \ ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \ |