Skip to content

Commit d91c9d0

Browse files
committed
Merge pull request #773 from jeffhostetler/vs2015
Build with VS2015
2 parents 4381063 + faa85eb commit d91c9d0

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
@@ -1101,7 +1101,7 @@ endif
11011101

11021102
ifdef SANE_TOOL_PATH
11031103
SANE_TOOL_PATH_SQ = $(subst ','\'',$(SANE_TOOL_PATH))
1104-
BROKEN_PATH_FIX = 's|^\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix $(SANE_TOOL_PATH_SQ)|'
1104+
BROKEN_PATH_FIX = 's|^\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix "$(SANE_TOOL_PATH_SQ)"|'
11051105
PATH := $(SANE_TOOL_PATH):${PATH}
11061106
else
11071107
BROKEN_PATH_FIX = '/^\# @@BROKEN_PATH_FIX@@$$/d'
@@ -2563,6 +2563,28 @@ install: all
25632563
$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
25642564
$(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
25652565
$(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)'
2566+
ifdef MSVC
2567+
$(INSTALL) compat/vcbuild/GEN.DEPS/bin/*.dll '$(DESTDIR_SQ)$(bindir_SQ)'
2568+
$(INSTALL) compat/vcbuild/GEN.DEPS/bin/*.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2569+
# We DO NOT install the individual foo.o.pdb files because they
2570+
# have already been rolled up into the exe's pdb file.
2571+
# We DO NOT have pdb files for the builtin commands (like git-status.exe)
2572+
# because it is just a copy/hardlink of git.exe, rather than a unique binary.
2573+
$(INSTALL) git.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2574+
$(INSTALL) git-shell.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2575+
$(INSTALL) git-upload-pack.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2576+
$(INSTALL) git-credential-store.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2577+
$(INSTALL) git-daemon.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2578+
$(INSTALL) git-fast-import.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2579+
$(INSTALL) git-http-backend.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2580+
$(INSTALL) git-http-fetch.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2581+
$(INSTALL) git-http-push.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2582+
$(INSTALL) git-imap-send.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2583+
$(INSTALL) git-remote-http.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2584+
$(INSTALL) git-remote-testsvn.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2585+
$(INSTALL) git-sh-i18n--envsubst.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2586+
$(INSTALL) git-show-index.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2587+
endif
25662588
$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
25672589
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'
25682590
$(INSTALL) -m 644 mergetools/* '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'
@@ -2730,6 +2752,12 @@ endif
27302752
$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-LDFLAGS GIT-BUILD-OPTIONS
27312753
$(RM) GIT-USER-AGENT GIT-PREFIX
27322754
$(RM) GIT-SCRIPT-DEFINES GIT-PERL-DEFINES GIT-PYTHON-VARS
2755+
ifdef MSVC
2756+
$(RM) $(patsubst %.o,%.o.pdb,$(OBJECTS))
2757+
$(RM) $(patsubst %.exe,%.pdb,$(OTHER_PROGRAMS))
2758+
$(RM) $(patsubst %.exe,%.pdb,$(PROGRAMS))
2759+
$(RM) $(patsubst %.exe,%.pdb,$(TEST_PROGRAMS))
2760+
endif
27332761

27342762
.PHONY: all install profile-clean clean strip
27352763
.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)
@@ -110,7 +110,7 @@ static int do_invalidate_path(struct cache_tree *it, const char *path)
110110
int namelen;
111111
struct cache_tree_sub *down;
112112

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

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

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

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

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

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

0 commit comments

Comments
 (0)