mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
Makefile: use shell for-loop rather than Make's foreach loop during install
The install target uses a foreach loop to generate a single long shell command line to handle installation of the built-in git commands. The maximum length of the argument list varies by platform, and this use of foreach quickly grows the length of the argument list. Current git can exceed the default maximum argument list length on IRIX 6.5 of 20480 depending on the installation path. Rather than using make's foreach loop to pre-generate the shell command line, use a shell for-loop and allow the shell to iterate through each of the built-in commands. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
35641310af
commit
b56c79ccea
10
Makefile
10
Makefile
|
@ -1441,10 +1441,12 @@ endif
|
|||
{ $(RM) "$$execdir/git-add$X" && \
|
||||
ln git-add$X "$$execdir/git-add$X" 2>/dev/null || \
|
||||
cp git-add$X "$$execdir/git-add$X"; } && \
|
||||
{ $(foreach p,$(filter-out git-add$X,$(BUILT_INS)), $(RM) "$$execdir/$p" && \
|
||||
ln "$$execdir/git-add$X" "$$execdir/$p" 2>/dev/null || \
|
||||
ln -s "git-add$X" "$$execdir/$p" 2>/dev/null || \
|
||||
cp "$$execdir/git-add$X" "$$execdir/$p" || exit;) } && \
|
||||
{ for p in $(filter-out git-add$X,$(BUILT_INS)); do \
|
||||
$(RM) "$$execdir/$$p" && \
|
||||
ln "$$execdir/git-add$X" "$$execdir/$$p" 2>/dev/null || \
|
||||
ln -s "git-add$X" "$$execdir/$$p" 2>/dev/null || \
|
||||
cp "$$execdir/git-add$X" "$$execdir/$$p" || exit; \
|
||||
done } && \
|
||||
./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X"
|
||||
|
||||
install-doc:
|
||||
|
|
Loading…
Reference in a new issue