Skip to content

Commit 8371f6e

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
Merge pull request #773 from jeffhostetler/vs2015
Build with VS2015
2 parents bd371ec + fb93dd3 commit 8371f6e

16 files changed

+809
-24
lines changed

.gitignore

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

Makefile

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

11801180
ifdef SANE_TOOL_PATH
11811181
SANE_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)"|'
11831183
PATH := $(SANE_TOOL_PATH):${PATH}
11841184
else
11851185
BROKEN_PATH_FIX = '/^\# @@BROKEN_PATH_FIX@@$$/d'
@@ -2749,6 +2749,28 @@ 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+
$(INSTALL) compat/vcbuild/GEN.DEPS/bin/*.dll '$(DESTDIR_SQ)$(bindir_SQ)'
2754+
$(INSTALL) compat/vcbuild/GEN.DEPS/bin/*.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2755+
# We DO NOT install the individual foo.o.pdb files because they
2756+
# have already been rolled up into the exe's pdb file.
2757+
# We DO NOT have pdb files for the builtin commands (like git-status.exe)
2758+
# because it is just a copy/hardlink of git.exe, rather than a unique binary.
2759+
$(INSTALL) git.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2760+
$(INSTALL) git-shell.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2761+
$(INSTALL) git-upload-pack.pdb '$(DESTDIR_SQ)$(bindir_SQ)'
2762+
$(INSTALL) git-credential-store.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2763+
$(INSTALL) git-daemon.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2764+
$(INSTALL) git-fast-import.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2765+
$(INSTALL) git-http-backend.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2766+
$(INSTALL) git-http-fetch.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2767+
$(INSTALL) git-http-push.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2768+
$(INSTALL) git-imap-send.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2769+
$(INSTALL) git-remote-http.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2770+
$(INSTALL) git-remote-testsvn.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2771+
$(INSTALL) git-sh-i18n--envsubst.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2772+
$(INSTALL) git-show-index.pdb '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
2773+
endif
27522774
$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
27532775
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'
27542776
$(INSTALL) -m 644 mergetools/* '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'
@@ -2949,6 +2971,12 @@ endif
29492971
$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-LDFLAGS GIT-BUILD-OPTIONS
29502972
$(RM) GIT-USER-AGENT GIT-PREFIX
29512973
$(RM) GIT-SCRIPT-DEFINES GIT-PERL-DEFINES GIT-PERL-HEADER GIT-PYTHON-VARS
2974+
ifdef MSVC
2975+
$(RM) $(patsubst %.o,%.o.pdb,$(OBJECTS))
2976+
$(RM) $(patsubst %.exe,%.pdb,$(OTHER_PROGRAMS))
2977+
$(RM) $(patsubst %.exe,%.pdb,$(PROGRAMS))
2978+
$(RM) $(patsubst %.exe,%.pdb,$(TEST_PROGRAMS))
2979+
endif
29522980

29532981
.PHONY: all install profile-clean cocciclean clean strip
29542982
.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
@@ -5,8 +5,8 @@
55
#include "cache-tree.h"
66
#include "object-store.h"
77

8-
#ifndef DEBUG
9-
#define DEBUG 0
8+
#ifndef DEBUG_CACHE_TREE
9+
#define DEBUG_CACHE_TREE 0
1010
#endif
1111

1212
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, oid->hash, the_hash_algo->rawsz);
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,
@@ -529,7 +529,7 @@ static struct cache_tree *read_one(const char **buffer, unsigned long *size_p)
529529
size -= rawsz;
530530
}
531531

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

0 commit comments

Comments
 (0)