[PATCH] Fix use of hardlinks in "make install"
- From
Alex Riesen <raa.lkml@gmail.com>
- Date
- Aug 28, 2008, 14:30 UTC
- Message-ID
- <81b0412b0808280730m351d409cnab9bbda1f5871938@mail.gmail.com>
- In-Reply-To
- <81b0412b0808280717u78c5ccf8ne1413c701ed8edd9@mail.gmail.com>
The code failed to filter-out git-add properly on platforms were $X is not empty (ATM there is only one such a platform).
Than it tried to create a hardlink to the file ($execdir/git-add) it just removed (because git-add is first in the BUILT_INS), so ln failed (but because stderr was redirected into /dev/null the error was never seen), and the whole install ended up using "ln -s" instead.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> --- Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
2008/8/28 Alex Riesen <raa.lkml@gmail.com>:
Show 7 quoted lines
> 2008/8/28 Alex Riesen <raa.lkml@gmail.com>: >> >> It created endless symlink loops on cygwin, but obviously nowhere else. >> > > Sh@#! Scrap that, there is something else going on in that cygwindows thing... >
Well, as usual, simple fix for trivial typo caused by existence of an idiotic platform.
From 6d83dbb0e3b78bfaad9522b2266d0864e434acce Mon Sep 17 00:00:00 2001 From: Alex Riesen <raa.lkml@gmail.com> Date: Thu, 28 Aug 2008 15:57:32 +0200 Subject: [PATCH] Fix use of hardlinks in "make install"
The code failed to filter-out git-add properly on platforms were $X is not empty (ATM there is only one such a platform).
Than it tried to create a hardlink to the file ($execdir/git-add) it just removed (because git-add is first in the BUILT_INS), so ln failed (but because stderr was redirected into /dev/null the error was never seen), and the whole install ended up using "ln -s" instead.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> --- Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile index bf400e6..20f028f 100644 --- a/Makefile +++ b/Makefile @@ -1379,7 +1379,7 @@ endif { $(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,$(BUILT_INS)), $(RM) "$$execdir/$p" && \ + { $(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;) } && \
-- 1.6.0.1.152.g6969c