Skip to content

Commit c70a8d9

Browse files
Johannes Sixtgitster
authored andcommitted
Makefile: Do not install a copy of 'git' in $(gitexecdir)
There is already a copy in $(bindir). A subsequent patch will enable git to derive the exec-path from its invocation path. If git is invoked recursively, the first invocation puts the exec-path into PATH, so that the recursive invocation would find the instance in the exec-path. This second instance would again try to derive an exec-path from its invocation path, but would base its result on the wrong "bindir". We do install the copy of git first, but remove it later, so that we can use it as the source of the hardlinks for the builtins. Signed-off-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 819b2b5 commit c70a8d9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,6 +1340,7 @@ endif
13401340
'$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X'; \
13411341
fi
13421342
$(foreach p,$(BUILT_INS), $(RM) '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)
1343+
$(RM) '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X'
13431344
ifneq (,$X)
13441345
$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), $(RM) '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p';)
13451346
endif

0 commit comments

Comments
 (0)