@matheusbsbs / matheus-bagliano / commits / 40919c483a
Fork 0

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 <casey@nrlssc.navy.mil> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Brandon Casey committed Jul 23, 2010 at 12:50 UTC 40919c483a28f34d43fbef2a84a294b3554caffd
1 file changed +6
Makefile
+6
@@ -2079,6 +2079,12 @@ endif
2079 test -z "$(NO_CROSS_DIRECTORY_HARDLINKS)" && \
2080 ln "$$bindir/git$X" "$$execdir/git$X" 2>/dev/null || \
2081 cp "$$bindir/git$X" "$$execdir/git$X"; } ; } && \
2082 + for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \
2083 + $(RM) "$$bindir/$$p" && \
2084 + ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \
2085 + ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \
2086 + cp "$$bindir/git$X" "$$bindir/$$p" || exit; \
2087 + done && \
2088 for p in $(BUILT_INS); do \
2089 $(RM) "$$execdir/$$p" && \
2090 ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \