summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-08-30 05:39:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-08-30 05:39:25 (GMT)
commit014aff7c928fff3926acbe946715ed1bc95830bf (patch)
tree8ea382a690dc2f53a91b66d3ddf0b5c3852b3328 /Makefile
parent6ffaecc7d8b2c3c188a2efa5977a6e6605d878d9 (diff)
parent4e3ae59ef63475411f4c073ba3a1478b1ef73b9a (diff)
downloadgit-014aff7c928fff3926acbe946715ed1bc95830bf.zip
git-014aff7c928fff3926acbe946715ed1bc95830bf.tar.gz
git-014aff7c928fff3926acbe946715ed1bc95830bf.tar.bz2
Merge branch 'af/maint-install-no-handlink' into maint
* af/maint-install-no-handlink: Fix use of hardlinks in "make install" Makefile: always provide a fallback when hardlinks fail
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 11 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index a65679a..00991b7 100644
--- a/Makefile
+++ b/Makefile
@@ -1098,7 +1098,10 @@ help.o: help.c common-cmds.h GIT-CFLAGS
'-DGIT_INFO_PATH="$(infodir_SQ)"' $<
$(BUILT_INS): git$X
- $(QUIET_BUILT_IN)$(RM) $@ && ln git$X $@
+ $(QUIET_BUILT_IN)$(RM) $@ && \
+ ln git$X $@ 2>/dev/null || \
+ ln -s git$X $@ 2>/dev/null || \
+ cp git$X $@
common-cmds.h: ./generate-cmdlist.sh command-list.txt
@@ -1357,16 +1360,13 @@ ifneq (,$X)
endif
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
- if test "z$$bindir" != "z$$execdir"; \
- then \
- ln -f "$$bindir/git$X" "$$execdir/git$X" || \
- cp "$$bindir/git$X" "$$execdir/git$X"; \
- fi && \
- { $(foreach p,$(BUILT_INS), $(RM) "$$execdir/$p" && ln "$$execdir/git$X" "$$execdir/$p" ;) } && \
- if test "z$$bindir" != "z$$execdir"; \
- then \
- $(RM) "$$execdir/git$X"; \
- fi && \
+ { $(RM) "$$execdir/git-add$X" && \
+ ln git-add$X "$$execdir/git-add$X" 2>/dev/null || \
+ cp git-add$X "$$execdir/git-add$X"; } && \
+ { $(foreach p,$(filter-out git-add$X,$(BUILT_INS)), $(RM) "$$execdir/$p" && \
+ ln "$$execdir/git-add$X" "$$execdir/$p" 2>/dev/null || \
+ ln -s "git-add$X" "$$execdir/$p" 2>/dev/null || \
+ cp "$$execdir/git-add$X" "$$execdir/$p" || exit;) } && \
./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X"
install-doc: