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
This commit is contained in:
Junio C Hamano 2008-08-29 22:39:25 -07:00
commit 014aff7c92

View File

@ -1098,7 +1098,10 @@ help.o: help.c common-cmds.h GIT-CFLAGS
'-DGIT_INFO_PATH="$(infodir_SQ)"' $< '-DGIT_INFO_PATH="$(infodir_SQ)"' $<
$(BUILT_INS): git$X $(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 common-cmds.h: ./generate-cmdlist.sh command-list.txt
@ -1357,16 +1360,13 @@ ifneq (,$X)
endif endif
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \ bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \ execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
if test "z$$bindir" != "z$$execdir"; \ { $(RM) "$$execdir/git-add$X" && \
then \ ln git-add$X "$$execdir/git-add$X" 2>/dev/null || \
ln -f "$$bindir/git$X" "$$execdir/git$X" || \ cp git-add$X "$$execdir/git-add$X"; } && \
cp "$$bindir/git$X" "$$execdir/git$X"; \ { $(foreach p,$(filter-out git-add$X,$(BUILT_INS)), $(RM) "$$execdir/$p" && \
fi && \ ln "$$execdir/git-add$X" "$$execdir/$p" 2>/dev/null || \
{ $(foreach p,$(BUILT_INS), $(RM) "$$execdir/$p" && ln "$$execdir/git$X" "$$execdir/$p" ;) } && \ ln -s "git-add$X" "$$execdir/$p" 2>/dev/null || \
if test "z$$bindir" != "z$$execdir"; \ cp "$$execdir/git-add$X" "$$execdir/$p" || exit;) } && \
then \
$(RM) "$$execdir/git$X"; \
fi && \
./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X" ./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X"
install-doc: install-doc: