Skip to content

Commit 0fd26f4

Browse files
committed
Merge branch 'bc/use-more-hardlinks-in-install' into maint
* bc/use-more-hardlinks-in-install: Makefile: make hard/symbolic links for non-builtins too Makefile: link builtins residing in bin directory to main git binary too
2 parents 443938d + 76d079a commit 0fd26f4

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

Makefile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2076,10 +2076,19 @@ endif
20762076
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
20772077
execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
20782078
{ test "$$bindir/" = "$$execdir/" || \
2079-
{ $(RM) "$$execdir/git$X" && \
2079+
for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \
2080+
$(RM) "$$execdir/$$p" && \
20802081
test -z "$(NO_CROSS_DIRECTORY_HARDLINKS)" && \
2081-
ln "$$bindir/git$X" "$$execdir/git$X" 2>/dev/null || \
2082-
cp "$$bindir/git$X" "$$execdir/git$X"; } ; } && \
2082+
ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \
2083+
cp "$$bindir/$$p" "$$execdir/$$p" || exit; \
2084+
done; \
2085+
} && \
2086+
for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \
2087+
$(RM) "$$bindir/$$p" && \
2088+
ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \
2089+
ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \
2090+
cp "$$bindir/git$X" "$$bindir/$$p" || exit; \
2091+
done && \
20832092
for p in $(BUILT_INS); do \
20842093
$(RM) "$$execdir/$$p" && \
20852094
ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \

0 commit comments

Comments
 (0)