Skip to content

Commit 76d079a

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

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2075,10 +2075,13 @@ endif
20752075
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
20762076
execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
20772077
{ 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" && \
20792080
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+
} && \
20822085
for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \
20832086
$(RM) "$$bindir/$$p" && \
20842087
ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \

0 commit comments

Comments
 (0)