@@ -348,6 +348,9 @@ all::
348
348
# Define NO_INSTALL_HARDLINKS if you prefer to use either symbolic links or
349
349
# copies to install built-in git commands e.g. git-cat-file.
350
350
#
351
+ # Define SKIP_DASHED_BUILT_INS if you do not need the dashed versions of the
352
+ # built-ins to be linked/copied at all.
353
+ #
351
354
# Define USE_NED_ALLOCATOR if you want to replace the platforms default
352
355
# memory allocators with the nedmalloc allocator written by Niall Douglas.
353
356
#
@@ -775,6 +778,16 @@ BUILT_INS += git-whatchanged$X
775
778
# what 'all' will build and 'install' will install in gitexecdir,
776
779
# excluding programs for built-in commands
777
780
ALL_PROGRAMS = $(PROGRAMS ) $(SCRIPTS )
781
+ ALL_COMMANDS_TO_INSTALL = $(ALL_PROGRAMS )
782
+ ifeq (,$(SKIP_DASHED_BUILT_INS ) )
783
+ ALL_COMMANDS_TO_INSTALL += $(BUILT_INS )
784
+ else
785
+ # git-upload-pack, git-receive-pack and git-upload-archive are special: they
786
+ # are _expected_ to be present in the `bin/` directory in their dashed form.
787
+ ALL_COMMANDS_TO_INSTALL += git-receive-pack$(X )
788
+ ALL_COMMANDS_TO_INSTALL += git-upload-archive$(X )
789
+ ALL_COMMANDS_TO_INSTALL += git-upload-pack$(X )
790
+ endif
778
791
779
792
# what 'all' will build but not install in gitexecdir
780
793
OTHER_PROGRAMS = git$X
@@ -2089,9 +2102,9 @@ profile-fast: profile-clean
2089
2102
$(MAKE ) PROFILE=USE all
2090
2103
2091
2104
2092
- all :: $(ALL_PROGRAMS ) $(SCRIPT_LIB ) $( BUILT_INS ) $(OTHER_PROGRAMS ) GIT-BUILD-OPTIONS
2105
+ all :: $(ALL_COMMANDS_TO_INSTALL ) $(SCRIPT_LIB ) $(OTHER_PROGRAMS ) GIT-BUILD-OPTIONS
2093
2106
ifneq (,$X)
2094
- $(QUIET_BUILT_IN)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS ) git$X)), test -d '$p' -o '$p' -ef '$p$X' || $(RM) '$p';)
2107
+ $(QUIET_BUILT_IN)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_COMMANDS_TO_INSTALL ) git$X)), test -d '$p' -o '$p' -ef '$p$X' || $(RM) '$p';)
2095
2108
endif
2096
2109
2097
2110
all ::
@@ -2922,15 +2935,8 @@ ifdef MSVC
2922
2935
# have already been rolled up into the exe's pdb file.
2923
2936
# We DO NOT have pdb files for the builtin commands (like git-status.exe)
2924
2937
# because it is just a copy/hardlink of git.exe, rather than a unique binary.
2925
- $(INSTALL) git.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2926
- $(INSTALL) git-shell.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2927
- $(INSTALL) git-daemon.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2928
- $(INSTALL) git-http-backend.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2929
- $(INSTALL) git-http-fetch.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2930
- $(INSTALL) git-http-push.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2931
- $(INSTALL) git-imap-send.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2932
- $(INSTALL) git-remote-http.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2933
- $(INSTALL) git-sh-i18n--envsubst.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2938
+ $(INSTALL) $(patsubst %.exe,%.pdb,$(filter-out $(BUILT_INS),$(patsubst %,%$X,$(BINDIR_PROGRAMS_NEED_X)))) '$(DESTDIR_SQ)$(bindir_SQ)'
2939
+ $(INSTALL) $(patsubst %.exe,%.pdb,$(filter-out $(BUILT_INS) $(REMOTE_CURL_ALIASES),$(PROGRAMS))) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2934
2940
ifndef DEBUG
2935
2941
$(INSTALL) $(vcpkg_rel_bin)/*.dll '$(DESTDIR_SQ)$(bindir_SQ)'
2936
2942
$(INSTALL) $(vcpkg_rel_bin)/*.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
@@ -2958,7 +2964,7 @@ ifndef NO_TCLTK
2958
2964
$(MAKE) -C git-gui gitexecdir='$(gitexec_instdir_SQ)' install
2959
2965
endif
2960
2966
ifneq (,$X)
2961
- $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS ) git$X)), test '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p' -ef '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p$X' || $(RM) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p';)
2967
+ $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_COMMANDS_TO_INSTALL ) git$X)), test '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p' -ef '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p$X' || $(RM) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p';)
2962
2968
endif
2963
2969
2964
2970
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
@@ -2976,21 +2982,27 @@ endif
2976
2982
} && \
2977
2983
for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \
2978
2984
$(RM) "$$bindir/$$p" && \
2979
- test -n "$(INSTALL_SYMLINKS)" && \
2980
- ln -s "git$X" "$$bindir/$$p" || \
2981
- { test -z "$(NO_INSTALL_HARDLINKS)" && \
2982
- ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \
2983
- ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \
2984
- cp "$$bindir/git$X" "$$bindir/$$p" || exit; } \
2985
+ if test -z "$(SKIP_DASHED_BUILT_INS)"; \
2986
+ then \
2987
+ test -n "$(INSTALL_SYMLINKS)" && \
2988
+ ln -s "git$X" "$$bindir/$$p" || \
2989
+ { test -z "$(NO_INSTALL_HARDLINKS)" && \
2990
+ ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \
2991
+ ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \
2992
+ cp "$$bindir/git$X" "$$bindir/$$p" || exit; }; \
2993
+ fi \
2985
2994
done && \
2986
2995
for p in $(BUILT_INS); do \
2987
2996
$(RM) "$$execdir/$$p" && \
2988
- test -n "$(INSTALL_SYMLINKS)" && \
2989
- ln -s "$$destdir_from_execdir_SQ/$(bindir_relative_SQ)/git$X" "$$execdir/$$p" || \
2990
- { test -z "$(NO_INSTALL_HARDLINKS)" && \
2991
- ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \
2992
- ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \
2993
- cp "$$execdir/git$X" "$$execdir/$$p" || exit; } \
2997
+ if test -z "$(SKIP_DASHED_BUILT_INS)"; \
2998
+ then \
2999
+ test -n "$(INSTALL_SYMLINKS)" && \
3000
+ ln -s "$$destdir_from_execdir_SQ/$(bindir_relative_SQ)/git$X" "$$execdir/$$p" || \
3001
+ { test -z "$(NO_INSTALL_HARDLINKS)" && \
3002
+ ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \
3003
+ ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \
3004
+ cp "$$execdir/git$X" "$$execdir/$$p" || exit; }; \
3005
+ fi \
2994
3006
done && \
2995
3007
remote_curl_aliases="$(REMOTE_CURL_ALIASES)" && \
2996
3008
for p in $$remote_curl_aliases; do \
@@ -3084,7 +3096,7 @@ ifneq ($(INCLUDE_DLLS_IN_ARTIFACTS),)
3084
3096
OTHER_PROGRAMS += $(shell echo * .dll t/helper/* .dll)
3085
3097
endif
3086
3098
3087
- artifacts-tar :: $(ALL_PROGRAMS ) $(SCRIPT_LIB ) $( BUILT_INS ) $(OTHER_PROGRAMS ) \
3099
+ artifacts-tar :: $(ALL_COMMANDS_TO_INSTALL ) $(SCRIPT_LIB ) $(OTHER_PROGRAMS ) \
3088
3100
GIT-BUILD-OPTIONS $(TEST_PROGRAMS ) $(test_bindir_programs ) \
3089
3101
$(MOFILES )
3090
3102
$(QUIET_SUBDIR0 ) templates $(QUIET_SUBDIR1 ) \
@@ -3179,7 +3191,7 @@ endif
3179
3191
3180
3192
# ## Check documentation
3181
3193
#
3182
- ALL_COMMANDS = $(ALL_PROGRAMS ) $(SCRIPT_LIB ) $( BUILT_INS )
3194
+ ALL_COMMANDS = $(ALL_COMMANDS_TO_INSTALL ) $(SCRIPT_LIB )
3183
3195
ALL_COMMANDS += git
3184
3196
ALL_COMMANDS += git-citool
3185
3197
ALL_COMMANDS += git-gui
@@ -3219,7 +3231,7 @@ check-docs::
3219
3231
-e ' s/\.txt//' ; \
3220
3232
) | while read how cmd; \
3221
3233
do \
3222
- case " $( patsubst %$X ,%,$( ALL_COMMANDS) $( EXCLUDED_PROGRAMS) ) " in \
3234
+ case " $( patsubst %$X ,%,$( ALL_COMMANDS) $( BUILT_INS ) $( EXCLUDED_PROGRAMS) ) " in \
3223
3235
* " $$ cmd " * ) ;; \
3224
3236
* ) echo " removed but $$ how: $$ cmd" ;; \
3225
3237
esac ; \
0 commit comments