@matheusbsbs / matheus-bagliano / commits / 76d079aa56
Fork 0

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>

Brandon Casey committed Jul 23, 2010 at 12:50 UTC 76d079aa561a74d2c290d5ab7e3b69549ff325cb
1 file changed +6 -3
Makefile
+6 -3
@@ -2075,10 +2075,13 @@ endif
2075 bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
2076 execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
2077 { test "$$bindir/" = "$$execdir/" || \
2078 - { $(RM) "$$execdir/git$X" && \
2078 + for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
2079 + $(RM) "$$execdir/$$p" && \
2080 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"; } ; } && \
2081 + ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \
2082 + cp "$$bindir/$$p" "$$execdir/$$p" || exit; \
2083 + done; \
2084 + } && \
2085 for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \
2086 $(RM) "$$bindir/$$p" && \
2087 ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \