@@ -1179,7 +1179,7 @@ endif
11791179
11801180ifdef SANE_TOOL_PATH
11811181SANE_TOOL_PATH_SQ = $(subst ','\'',$(SANE_TOOL_PATH ) )
1182- BROKEN_PATH_FIX = 's|^\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix $(SANE_TOOL_PATH_SQ)|'
1182+ BROKEN_PATH_FIX = 's|^\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix " $(SANE_TOOL_PATH_SQ)" |'
11831183PATH := $(SANE_TOOL_PATH ) :${PATH}
11841184else
11851185BROKEN_PATH_FIX = '/^\# @@BROKEN_PATH_FIX@@$$/d'
@@ -2749,6 +2749,33 @@ install: all
27492749 $(INSTALL ) $(ALL_PROGRAMS ) ' $(DESTDIR_SQ)$(gitexec_instdir_SQ)'
27502750 $(INSTALL ) -m 644 $(SCRIPT_LIB ) ' $(DESTDIR_SQ)$(gitexec_instdir_SQ)'
27512751 $(INSTALL ) $(install_bindir_programs ) ' $(DESTDIR_SQ)$(bindir_SQ)'
2752+ ifdef MSVC
2753+ # We DO NOT install the individual foo.o.pdb files because they
2754+ # have already been rolled up into the exe's pdb file.
2755+ # We DO NOT have pdb files for the builtin commands (like git-status.exe)
2756+ # because it is just a copy/hardlink of git.exe, rather than a unique binary.
2757+ $(INSTALL) git.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2758+ $(INSTALL) git-shell.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2759+ $(INSTALL) git-upload-pack.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2760+ $(INSTALL) git-credential-store.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2761+ $(INSTALL) git-daemon.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2762+ $(INSTALL) git-fast-import.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2763+ $(INSTALL) git-http-backend.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2764+ $(INSTALL) git-http-fetch.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2765+ $(INSTALL) git-http-push.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2766+ $(INSTALL) git-imap-send.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2767+ $(INSTALL) git-remote-http.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2768+ $(INSTALL) git-remote-testsvn.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2769+ $(INSTALL) git-sh-i18n--envsubst.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2770+ $(INSTALL) git-show-index.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2771+ ifndef DEBUG
2772+ $(INSTALL) $(vcpkg_rel_bin)/*.dll '$(DESTDIR_SQ)$(bindir_SQ)'
2773+ $(INSTALL) $(vcpkg_rel_bin)/*.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2774+ else
2775+ $(INSTALL) $(vcpkg_dbg_bin)/*.dll '$(DESTDIR_SQ)$(bindir_SQ)'
2776+ $(INSTALL) $(vcpkg_dbg_bin)/*.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2777+ endif
2778+ endif
27522779 $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
27532780 $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'
27542781 $(INSTALL) -m 644 mergetools/* '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'
@@ -2949,6 +2976,19 @@ endif
29492976 $(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-LDFLAGS GIT-BUILD-OPTIONS
29502977 $(RM) GIT-USER-AGENT GIT-PREFIX
29512978 $(RM) GIT-SCRIPT-DEFINES GIT-PERL-DEFINES GIT-PERL-HEADER GIT-PYTHON-VARS
2979+ ifdef MSVC
2980+ $(RM) $(patsubst %.o,%.o.pdb,$(OBJECTS))
2981+ $(RM) $(patsubst %.exe,%.pdb,$(OTHER_PROGRAMS))
2982+ $(RM) $(patsubst %.exe,%.iobj,$(OTHER_PROGRAMS))
2983+ $(RM) $(patsubst %.exe,%.ipdb,$(OTHER_PROGRAMS))
2984+ $(RM) $(patsubst %.exe,%.pdb,$(PROGRAMS))
2985+ $(RM) $(patsubst %.exe,%.iobj,$(PROGRAMS))
2986+ $(RM) $(patsubst %.exe,%.ipdb,$(PROGRAMS))
2987+ $(RM) $(patsubst %.exe,%.pdb,$(TEST_PROGRAMS))
2988+ $(RM) $(patsubst %.exe,%.iobj,$(TEST_PROGRAMS))
2989+ $(RM) $(patsubst %.exe,%.ipdb,$(TEST_PROGRAMS))
2990+ $(RM) compat/vcbuild/MSVC-DEFS-GEN
2991+ endif
29522992
29532993.PHONY : all install profile-clean cocciclean clean strip
29542994.PHONY : shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
0 commit comments