Skip to content

Commit ffd4cce

Browse files
committed
Merge pull request #773 from jeffhostetler/vs2015
Build with VS2015
2 parents f6bf309 + 00e185a commit ffd4cce

16 files changed

+809
-24
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,5 +216,7 @@
216216
*.user
217217
*.idb
218218
*.pdb
219+
*.ilk
220+
.vs/
219221
/Debug/
220222
/Release/

Makefile

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

11061106
ifdef SANE_TOOL_PATH
11071107
SANE_TOOL_PATH_SQ = $(subst ','\'',$(SANE_TOOL_PATH))
1108-
BROKEN_PATH_FIX = 's|^\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix $(SANE_TOOL_PATH_SQ)|'
1108+
BROKEN_PATH_FIX = 's|^\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix "$(SANE_TOOL_PATH_SQ)"|'
11091109
PATH := $(SANE_TOOL_PATH):${PATH}
11101110
else
11111111
BROKEN_PATH_FIX = '/^\# @@BROKEN_PATH_FIX@@$$/d'
@@ -2582,6 +2582,28 @@ install: all
25822582
$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
25832583
$(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
25842584
$(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)'
2585+
ifdef MSVC
2586+
$(INSTALL) compat/vcbuild/GEN.DEPS/bin/*.dll '$(DESTDIR_SQ)$(bindir_SQ)'
2587+
$(INSTALL) compat/vcbuild/GEN.DEPS/bin/*.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2588+
# We DO NOT install the individual foo.o.pdb files because they
2589+
# have already been rolled up into the exe's pdb file.
2590+
# We DO NOT have pdb files for the builtin commands (like git-status.exe)
2591+
# because it is just a copy/hardlink of git.exe, rather than a unique binary.
2592+
$(INSTALL) git.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2593+
$(INSTALL) git-shell.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2594+
$(INSTALL) git-upload-pack.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2595+
$(INSTALL) git-credential-store.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2596+
$(INSTALL) git-daemon.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2597+
$(INSTALL) git-fast-import.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2598+
$(INSTALL) git-http-backend.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2599+
$(INSTALL) git-http-fetch.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2600+
$(INSTALL) git-http-push.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2601+
$(INSTALL) git-imap-send.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2602+
$(INSTALL) git-remote-http.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2603+
$(INSTALL) git-remote-testsvn.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2604+
$(INSTALL) git-sh-i18n--envsubst.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2605+
$(INSTALL) git-show-index.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2606+
endif
25852607
$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
25862608
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'
25872609
$(INSTALL) -m 644 mergetools/* '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'
@@ -2771,6 +2793,12 @@ endif
27712793
$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-LDFLAGS GIT-BUILD-OPTIONS
27722794
$(RM) GIT-USER-AGENT GIT-PREFIX
27732795
$(RM) GIT-SCRIPT-DEFINES GIT-PERL-DEFINES GIT-PYTHON-VARS
2796+
ifdef MSVC
2797+
$(RM) $(patsubst %.o,%.o.pdb,$(OBJECTS))
2798+
$(RM) $(patsubst %.exe,%.pdb,$(OTHER_PROGRAMS))
2799+
$(RM) $(patsubst %.exe,%.pdb,$(PROGRAMS))
2800+
$(RM) $(patsubst %.exe,%.pdb,$(TEST_PROGRAMS))
2801+
endif
27742802

27752803
.PHONY: all install profile-clean clean strip
27762804
.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
@@ -4,8 +4,8 @@
44
#include "tree-walk.h"
55
#include "cache-tree.h"
66

7-
#ifndef DEBUG
8-
#define DEBUG 0
7+
#ifndef DEBUG_CACHE_TREE
8+
#define DEBUG_CACHE_TREE 0
99
#endif
1010

1111
struct cache_tree *cache_tree(void)
@@ -109,7 +109,7 @@ static int do_invalidate_path(struct cache_tree *it, const char *path)
109109
int namelen;
110110
struct cache_tree_sub *down;
111111

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

@@ -392,7 +392,7 @@ static int update_one(struct cache_tree *it,
392392
strbuf_addf(&buffer, "%o %.*s%c", mode, entlen, path + baselen, '\0');
393393
strbuf_add(&buffer, sha1, 20);
394394

395-
#if DEBUG
395+
#if DEBUG_CACHE_TREE
396396
fprintf(stderr, "cache-tree update-one %o %.*s\n",
397397
mode, entlen, path + baselen);
398398
#endif
@@ -415,7 +415,7 @@ static int update_one(struct cache_tree *it,
415415

416416
strbuf_release(&buffer);
417417
it->entry_count = to_invalidate ? -1 : i - *skip_count;
418-
#if DEBUG
418+
#if DEBUG_CACHE_TREE
419419
fprintf(stderr, "cache-tree update-one (%d ent, %d subtree) %s\n",
420420
it->entry_count, it->subtree_nr,
421421
oid_to_hex(&it->oid));
@@ -454,7 +454,7 @@ static void write_one(struct strbuf *buffer, struct cache_tree *it,
454454
strbuf_add(buffer, path, pathlen);
455455
strbuf_addf(buffer, "%c%d %d\n", 0, it->entry_count, it->subtree_nr);
456456

457-
#if DEBUG
457+
#if DEBUG_CACHE_TREE
458458
if (0 <= it->entry_count)
459459
fprintf(stderr, "cache-tree <%.*s> (%d ent, %d subtree) %s\n",
460460
pathlen, path, it->entry_count, it->subtree_nr,
@@ -527,7 +527,7 @@ static struct cache_tree *read_one(const char **buffer, unsigned long *size_p)
527527
size -= 20;
528528
}
529529

530-
#if DEBUG
530+
#if DEBUG_CACHE_TREE
531531
if (0 <= it->entry_count)
532532
fprintf(stderr, "cache-tree <%s> (%d ent, %d subtree) %s\n",
533533
*buffer, it->entry_count, subtree_nr,

0 commit comments

Comments
 (0)