Makefile: make hard/symbolic links for non-builtins too
To conserve space/improve file caching we try to make hard or symbolic links from each builtin program to the main git executable rather than having each be a complete duplicate copy of it. We weren't doing this for the non-builtin programs though. So, just because we can, and because it's easy, and for completeness sake, let's do it. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
40919c483a
commit
76d079aa56
9
Makefile
9
Makefile
@ -2075,10 +2075,13 @@ 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) && \
|
||||||
{ test "$$bindir/" = "$$execdir/" || \
|
{ test "$$bindir/" = "$$execdir/" || \
|
||||||
{ $(RM) "$$execdir/git$X" && \
|
for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
|
||||||
|
$(RM) "$$execdir/$$p" && \
|
||||||
test -z "$(NO_CROSS_DIRECTORY_HARDLINKS)" && \
|
test -z "$(NO_CROSS_DIRECTORY_HARDLINKS)" && \
|
||||||
ln "$$bindir/git$X" "$$execdir/git$X" 2>/dev/null || \
|
ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \
|
||||||
cp "$$bindir/git$X" "$$execdir/git$X"; } ; } && \
|
cp "$$bindir/$$p" "$$execdir/$$p" || exit; \
|
||||||
|
done; \
|
||||||
|
} && \
|
||||||
for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \
|
for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \
|
||||||
$(RM) "$$bindir/$$p" && \
|
$(RM) "$$bindir/$$p" && \
|
||||||
ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \
|
ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \
|
||||||
|
Loading…
Reference in New Issue
Block a user