From: Brandon Casey Date: Fri, 23 Jul 2010 17:50:44 +0000 (-0500) Subject: Makefile: link builtins residing in bin directory to main git binary too X-Git-Tag: v1.7.2.3~24^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=40919c483a28f34d43fbef2a84a294b3554caffd;p=git.git Makefile: link builtins residing in bin directory to main git binary 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 builtin programs residing in the bin directory though. So, let's do so. Signed-off-by: Brandon Casey Reviewed-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- diff --git a/Makefile b/Makefile index bc3c57058..d725c1532 100644 --- a/Makefile +++ b/Makefile @@ -2079,6 +2079,12 @@ endif test -z "$(NO_CROSS_DIRECTORY_HARDLINKS)" && \ ln "$$bindir/git$X" "$$execdir/git$X" 2>/dev/null || \ cp "$$bindir/git$X" "$$execdir/git$X"; } ; } && \ + for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \ + $(RM) "$$bindir/$$p" && \ + ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \ + ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \ + cp "$$bindir/git$X" "$$bindir/$$p" || exit; \ + done && \ for p in $(BUILT_INS); do \ $(RM) "$$execdir/$$p" && \ ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \