Skip to content

Commit 2d38e28

Browse files
committed
Merge pull request #773 from jeffhostetler/vs2015
Build with VS2015
2 parents 7587982 + 56f5feb commit 2d38e28

16 files changed

+809
-24
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,5 +219,7 @@
219219
*.user
220220
*.idb
221221
*.pdb
222+
*.ilk
223+
.vs/
222224
/Debug/
223225
/Release/

Makefile

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

11651165
ifdef SANE_TOOL_PATH
11661166
SANE_TOOL_PATH_SQ = $(subst ','\'',$(SANE_TOOL_PATH))
1167-
BROKEN_PATH_FIX = 's|^\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix $(SANE_TOOL_PATH_SQ)|'
1167+
BROKEN_PATH_FIX = 's|^\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix "$(SANE_TOOL_PATH_SQ)"|'
11681168
PATH := $(SANE_TOOL_PATH):${PATH}
11691169
else
11701170
BROKEN_PATH_FIX = '/^\# @@BROKEN_PATH_FIX@@$$/d'
@@ -2724,6 +2724,28 @@ install: all
27242724
$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
27252725
$(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
27262726
$(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)'
2727+
ifdef MSVC
2728+
$(INSTALL) compat/vcbuild/GEN.DEPS/bin/*.dll '$(DESTDIR_SQ)$(bindir_SQ)'
2729+
$(INSTALL) compat/vcbuild/GEN.DEPS/bin/*.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2730+
# We DO NOT install the individual foo.o.pdb files because they
2731+
# have already been rolled up into the exe's pdb file.
2732+
# We DO NOT have pdb files for the builtin commands (like git-status.exe)
2733+
# because it is just a copy/hardlink of git.exe, rather than a unique binary.
2734+
$(INSTALL) git.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2735+
$(INSTALL) git-shell.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2736+
$(INSTALL) git-upload-pack.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2737+
$(INSTALL) git-credential-store.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2738+
$(INSTALL) git-daemon.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2739+
$(INSTALL) git-fast-import.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2740+
$(INSTALL) git-http-backend.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2741+
$(INSTALL) git-http-fetch.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2742+
$(INSTALL) git-http-push.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2743+
$(INSTALL) git-imap-send.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2744+
$(INSTALL) git-remote-http.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2745+
$(INSTALL) git-remote-testsvn.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2746+
$(INSTALL) git-sh-i18n--envsubst.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2747+
$(INSTALL) git-show-index.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2748+
endif
27272749
$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
27282750
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'
27292751
$(INSTALL) -m 644 mergetools/* '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'
@@ -2922,6 +2944,12 @@ endif
29222944
$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-LDFLAGS GIT-BUILD-OPTIONS
29232945
$(RM) GIT-USER-AGENT GIT-PREFIX
29242946
$(RM) GIT-SCRIPT-DEFINES GIT-PERL-DEFINES GIT-PERL-HEADER GIT-PYTHON-VARS
2947+
ifdef MSVC
2948+
$(RM) $(patsubst %.o,%.o.pdb,$(OBJECTS))
2949+
$(RM) $(patsubst %.exe,%.pdb,$(OTHER_PROGRAMS))
2950+
$(RM) $(patsubst %.exe,%.pdb,$(PROGRAMS))
2951+
$(RM) $(patsubst %.exe,%.pdb,$(TEST_PROGRAMS))
2952+
endif
29252953

29262954
.PHONY: all install profile-clean clean strip
29272955
.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, oid->hash, the_hash_algo->rawsz);
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,
@@ -528,7 +528,7 @@ static struct cache_tree *read_one(const char **buffer, unsigned long *size_p)
528528
size -= rawsz;
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)