Skip to content

Commit 899f6a1

Browse files
committed
Merge pull request #773 from jeffhostetler/vs2015
Build with VS2015
2 parents d850228 + b61376d commit 899f6a1

16 files changed

+809
-24
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,5 +223,7 @@
223223
*.user
224224
*.idb
225225
*.pdb
226+
*.ilk
227+
.vs/
226228
/Debug/
227229
/Release/

Makefile

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,7 @@ endif
11841184

11851185
ifdef SANE_TOOL_PATH
11861186
SANE_TOOL_PATH_SQ = $(subst ','\'',$(SANE_TOOL_PATH))
1187-
BROKEN_PATH_FIX = 's|^\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix $(SANE_TOOL_PATH_SQ)|'
1187+
BROKEN_PATH_FIX = 's|^\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix "$(SANE_TOOL_PATH_SQ)"|'
11881188
PATH := $(SANE_TOOL_PATH):${PATH}
11891189
else
11901190
BROKEN_PATH_FIX = '/^\# @@BROKEN_PATH_FIX@@$$/d'
@@ -2754,6 +2754,28 @@ install: all
27542754
$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
27552755
$(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
27562756
$(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)'
2757+
ifdef MSVC
2758+
$(INSTALL) compat/vcbuild/GEN.DEPS/bin/*.dll '$(DESTDIR_SQ)$(bindir_SQ)'
2759+
$(INSTALL) compat/vcbuild/GEN.DEPS/bin/*.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2760+
# We DO NOT install the individual foo.o.pdb files because they
2761+
# have already been rolled up into the exe's pdb file.
2762+
# We DO NOT have pdb files for the builtin commands (like git-status.exe)
2763+
# because it is just a copy/hardlink of git.exe, rather than a unique binary.
2764+
$(INSTALL) git.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2765+
$(INSTALL) git-shell.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2766+
$(INSTALL) git-upload-pack.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2767+
$(INSTALL) git-credential-store.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2768+
$(INSTALL) git-daemon.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2769+
$(INSTALL) git-fast-import.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2770+
$(INSTALL) git-http-backend.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2771+
$(INSTALL) git-http-fetch.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2772+
$(INSTALL) git-http-push.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2773+
$(INSTALL) git-imap-send.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2774+
$(INSTALL) git-remote-http.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2775+
$(INSTALL) git-remote-testsvn.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2776+
$(INSTALL) git-sh-i18n--envsubst.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2777+
$(INSTALL) git-show-index.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2778+
endif
27572779
$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
27582780
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'
27592781
$(INSTALL) -m 644 mergetools/* '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'
@@ -2954,6 +2976,12 @@ endif
29542976
$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-LDFLAGS GIT-BUILD-OPTIONS
29552977
$(RM) GIT-USER-AGENT GIT-PREFIX
29562978
$(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,%.pdb,$(PROGRAMS))
2983+
$(RM) $(patsubst %.exe,%.pdb,$(TEST_PROGRAMS))
2984+
endif
29572985

29582986
.PHONY: all install profile-clean cocciclean clean strip
29592987
.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell

cache-tree.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#include "object-store.h"
77
#include "replace-object.h"
88

9-
#ifndef DEBUG
10-
#define DEBUG 0
9+
#ifndef DEBUG_CACHE_TREE
10+
#define DEBUG_CACHE_TREE 0
1111
#endif
1212

1313
struct cache_tree *cache_tree(void)
@@ -111,7 +111,7 @@ static int do_invalidate_path(struct cache_tree *it, const char *path)
111111
int namelen;
112112
struct cache_tree_sub *down;
113113

114-
#if DEBUG
114+
#if DEBUG_CACHE_TREE
115115
fprintf(stderr, "cache-tree invalidate <%s>\n", path);
116116
#endif
117117

@@ -394,7 +394,7 @@ static int update_one(struct cache_tree *it,
394394
strbuf_addf(&buffer, "%o %.*s%c", mode, entlen, path + baselen, '\0');
395395
strbuf_add(&buffer, oid->hash, the_hash_algo->rawsz);
396396

397-
#if DEBUG
397+
#if DEBUG_CACHE_TREE
398398
fprintf(stderr, "cache-tree update-one %o %.*s\n",
399399
mode, entlen, path + baselen);
400400
#endif
@@ -417,7 +417,7 @@ static int update_one(struct cache_tree *it,
417417

418418
strbuf_release(&buffer);
419419
it->entry_count = to_invalidate ? -1 : i - *skip_count;
420-
#if DEBUG
420+
#if DEBUG_CACHE_TREE
421421
fprintf(stderr, "cache-tree update-one (%d ent, %d subtree) %s\n",
422422
it->entry_count, it->subtree_nr,
423423
oid_to_hex(&it->oid));
@@ -458,7 +458,7 @@ static void write_one(struct strbuf *buffer, struct cache_tree *it,
458458
strbuf_add(buffer, path, pathlen);
459459
strbuf_addf(buffer, "%c%d %d\n", 0, it->entry_count, it->subtree_nr);
460460

461-
#if DEBUG
461+
#if DEBUG_CACHE_TREE
462462
if (0 <= it->entry_count)
463463
fprintf(stderr, "cache-tree <%.*s> (%d ent, %d subtree) %s\n",
464464
pathlen, path, it->entry_count, it->subtree_nr,
@@ -532,7 +532,7 @@ static struct cache_tree *read_one(const char **buffer, unsigned long *size_p)
532532
size -= rawsz;
533533
}
534534

535-
#if DEBUG
535+
#if DEBUG_CACHE_TREE
536536
if (0 <= it->entry_count)
537537
fprintf(stderr, "cache-tree <%s> (%d ent, %d subtree) %s\n",
538538
*buffer, it->entry_count, subtree_nr,

0 commit comments

Comments
 (0)