@@ -354,6 +354,9 @@ all::
354
354
# Define NO_INSTALL_HARDLINKS if you prefer to use either symbolic links or
355
355
# copies to install built-in git commands e.g. git-cat-file.
356
356
#
357
+ # Define SKIP_DASHED_BUILT_INS if you do not need the dashed versions of the
358
+ # built-ins to be linked/copied at all.
359
+ #
357
360
# Define USE_NED_ALLOCATOR if you want to replace the platforms default
358
361
# memory allocators with the nedmalloc allocator written by Niall Douglas.
359
362
#
@@ -780,6 +783,16 @@ BUILT_INS += git-whatchanged$X
780
783
# what 'all' will build and 'install' will install in gitexecdir,
781
784
# excluding programs for built-in commands
782
785
ALL_PROGRAMS = $(PROGRAMS ) $(SCRIPTS )
786
+ ALL_PROGRAMS_AND_BUILT_INS = $(ALL_PROGRAMS )
787
+ ifeq (,$(SKIP_DASHED_BUILT_INS ) )
788
+ ALL_PROGRAMS_AND_BUILT_INS += $(BUILT_INS )
789
+ else
790
+ # git-upload-pack, git-receive-pack and git-upload-archive are special: they
791
+ # are _expected_ to be present in the `bin/` directory in their dashed form.
792
+ ALL_PROGRAMS_AND_BUILT_INS += git-receive-pack.exe
793
+ ALL_PROGRAMS_AND_BUILT_INS += git-upload-archive.exe
794
+ ALL_PROGRAMS_AND_BUILT_INS += git-upload-pack.exe
795
+ endif
783
796
784
797
# what 'all' will build but not install in gitexecdir
785
798
OTHER_PROGRAMS = git$X
@@ -2059,9 +2072,9 @@ profile-fast: profile-clean
2059
2072
$(MAKE ) PROFILE=USE all
2060
2073
2061
2074
2062
- all :: $(ALL_PROGRAMS ) $(SCRIPT_LIB ) $( BUILT_INS ) $(OTHER_PROGRAMS ) GIT-BUILD-OPTIONS
2075
+ all :: $(ALL_PROGRAMS_AND_BUILT_INS ) $(SCRIPT_LIB ) $(OTHER_PROGRAMS ) GIT-BUILD-OPTIONS
2063
2076
ifneq (,$X)
2064
- $(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';)
2077
+ $(QUIET_BUILT_IN)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS_AND_BUILT_INS ) git$X)), test -d '$p' -o '$p' -ef '$p$X' || $(RM) '$p';)
2065
2078
endif
2066
2079
2067
2080
all ::
@@ -2924,7 +2937,7 @@ ifndef NO_TCLTK
2924
2937
$(MAKE) -C git-gui gitexecdir='$(gitexec_instdir_SQ)' install
2925
2938
endif
2926
2939
ifneq (,$X)
2927
- $(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';)
2940
+ $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS_AND_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';)
2928
2941
endif
2929
2942
2930
2943
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
@@ -2942,21 +2955,27 @@ endif
2942
2955
} && \
2943
2956
for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \
2944
2957
$(RM) "$$bindir/$$p" && \
2945
- test -n "$(INSTALL_SYMLINKS)" && \
2946
- ln -s "git$X" "$$bindir/$$p" || \
2947
- { test -z "$(NO_INSTALL_HARDLINKS)" && \
2948
- ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \
2949
- ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \
2950
- cp "$$bindir/git$X" "$$bindir/$$p" || exit; } \
2958
+ if test -z "$(SKIP_DASHED_BUILT_INS)"; \
2959
+ then \
2960
+ test -n "$(INSTALL_SYMLINKS)" && \
2961
+ ln -s "git$X" "$$bindir/$$p" || \
2962
+ { test -z "$(NO_INSTALL_HARDLINKS)" && \
2963
+ ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \
2964
+ ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \
2965
+ cp "$$bindir/git$X" "$$bindir/$$p" || exit; }; \
2966
+ fi \
2951
2967
done && \
2952
2968
for p in $(BUILT_INS); do \
2953
2969
$(RM) "$$execdir/$$p" && \
2954
- test -n "$(INSTALL_SYMLINKS)" && \
2955
- ln -s "$$destdir_from_execdir_SQ/$(bindir_relative_SQ)/git$X" "$$execdir/$$p" || \
2956
- { test -z "$(NO_INSTALL_HARDLINKS)" && \
2957
- ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \
2958
- ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \
2959
- cp "$$execdir/git$X" "$$execdir/$$p" || exit; } \
2970
+ if test -z "$(SKIP_DASHED_BUILT_INS)"; \
2971
+ then \
2972
+ test -n "$(INSTALL_SYMLINKS)" && \
2973
+ ln -s "$$destdir_from_execdir_SQ/$(bindir_relative_SQ)/git$X" "$$execdir/$$p" || \
2974
+ { test -z "$(NO_INSTALL_HARDLINKS)" && \
2975
+ ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \
2976
+ ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \
2977
+ cp "$$execdir/git$X" "$$execdir/$$p" || exit; }; \
2978
+ fi \
2960
2979
done && \
2961
2980
remote_curl_aliases="$(REMOTE_CURL_ALIASES)" && \
2962
2981
for p in $$remote_curl_aliases; do \
@@ -3047,7 +3066,7 @@ ifneq ($(INCLUDE_DLLS_IN_ARTIFACTS),)
3047
3066
OTHER_PROGRAMS += $(shell echo * .dll t/helper/* .dll)
3048
3067
endif
3049
3068
3050
- artifacts-tar :: $(ALL_PROGRAMS ) $(SCRIPT_LIB ) $( BUILT_INS ) $(OTHER_PROGRAMS ) \
3069
+ artifacts-tar :: $(ALL_PROGRAMS_AND_BUILT_INS ) $(SCRIPT_LIB ) $(OTHER_PROGRAMS ) \
3051
3070
GIT-BUILD-OPTIONS $(TEST_PROGRAMS ) $(test_bindir_programs ) \
3052
3071
$(MOFILES )
3053
3072
$(QUIET_SUBDIR0 ) templates $(QUIET_SUBDIR1 ) \
@@ -3142,7 +3161,7 @@ endif
3142
3161
3143
3162
# ## Check documentation
3144
3163
#
3145
- ALL_COMMANDS = $(ALL_PROGRAMS ) $(SCRIPT_LIB ) $( BUILT_INS )
3164
+ ALL_COMMANDS = $(ALL_PROGRAMS_AND_BUILT_INS ) $(SCRIPT_LIB )
3146
3165
ALL_COMMANDS += git
3147
3166
ALL_COMMANDS += gitk
3148
3167
ALL_COMMANDS += gitweb
0 commit comments