Skip to content

Commit 40919c4

Browse files
drafnelgitster
authored andcommitted
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 <[email protected]> Reviewed-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 64fdc08 commit 40919c4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2079,6 +2079,12 @@ endif
20792079
test -z "$(NO_CROSS_DIRECTORY_HARDLINKS)" && \
20802080
ln "$$bindir/git$X" "$$execdir/git$X" 2>/dev/null || \
20812081
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 && \
20822088
for p in $(BUILT_INS); do \
20832089
$(RM) "$$execdir/$$p" && \
20842090
ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \

0 commit comments

Comments
 (0)