Skip to contentSkip to conversation

Add miss git-compat-util.h at regex.c and fnmatch.c Add git-compat-util.h to enable build at MSVC environment

PATCH In review Frank Li 15 participants 91 messages Jun 15, 2016 Kbuild

lore
Share & tools
lore

Frank Li

author
#0 lore raw

PATCH 6/11 Add miss git-compat-util.h at regex.c and fnmatch.c Add git-compat-util.h to enable build at MSVC environment

---
 compat/fnmatch/fnmatch.c |    4 ++++
 compat/regex/regex.c     |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
compat/fnmatch/fnmatch.c +4 -0
index 14feac7..5cbd49c 100644
@@ -16,6 +16,10 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifdef _MSC_VER
+#include "git-compat-util.h"
+#endif
+
 #if HAVE_CONFIG_H
 # include <config.h>
 #endif
compat/regex/regex.c +4 -0
index 5728de1..2298a3a 100644
@@ -20,6 +20,10 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 /* AIX requires this to be the first thing in the file. */
+#ifdef _MSC_VER
+#include "git-compat-util.h"
+#endif
+
 #if defined (_AIX) && !defined (REGEX_MALLOC)
   #pragma alloca
 #endif
Signature · 1 line
1.6.4.msysgit.0
author
#1 lore raw

PATCH 7/11 Add O_BINARY flag to open flag at mingw.c

Windows will convert CR\LF and union code at text mode. Git doesn't like this. Add O_BINARY flag to open function

---
 compat/mingw.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
compat/mingw.c +2 -2
index 75c74b1..d5fa0ed 100644
@@ -132,7 +132,7 @@ int mingw_open (const char *filename, int oflags, ...)
 	if (!strcmp(filename, "/dev/null"))
 		filename = "nul";
 
-	fd = open(filename, oflags, mode);
+	fd = open(filename, oflags | O_BINARY, mode);
 
 	if (fd < 0 && (oflags & O_CREAT) && errno == EACCES) {
 		DWORD attrs = GetFileAttributes(filename);
@@ -278,7 +278,7 @@ int mkstemp(char *template)
 	char *filename = mktemp(template);
 	if (filename == NULL)
 		return -1;
-	return open(filename, O_RDWR | O_CREAT, 0600);
+	return open(filename, O_RDWR | O_CREAT | O_BINARY, 0600);
 }
 
 int gettimeofday(struct timeval *tv, void *tz)
Signature · 1 line
1.6.4.msysgit.0
author
#2 lore raw

PATCH 8/11 Place __stdcall to correct position.

MSVC require __stdcall is between return value and function name. ALL Win32 API definition is as TYPE WINAPI function name

---
 compat/mingw.c |    4 ++--
 run-command.c  |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
compat/mingw.c +2 -2
index d5fa0ed..0c9c793 100644
@@ -1017,7 +1017,7 @@ static sig_handler_t timer_fn = SIG_DFL;
  * length to call the signal handler.
  */
 
-static __stdcall unsigned ticktack(void *dummy)
+static unsigned __stdcall ticktack(void *dummy)
 {
 	while (WaitForSingleObject(timer_event, timer_interval) == WAIT_TIMEOUT) {
 		if (timer_fn == SIG_DFL)
@@ -1146,7 +1146,7 @@ void mingw_open_html(const char *unixpath)
 
 int link(const char *oldpath, const char *newpath)
 {
-	typedef BOOL WINAPI (*T)(const char*, const char*, LPSECURITY_ATTRIBUTES);
+	typedef  BOOL (WINAPI *T)(const char*, const char*, LPSECURITY_ATTRIBUTES);
 	static T create_hard_link = NULL;
 	if (!create_hard_link) {
 		create_hard_link = (T) GetProcAddress(
run-command.c +2 -2
index df139da..423b506 100644
@@ -295,12 +295,12 @@ int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const
 }
 
 #if defined(__MINGW32__) || defined(_MSC_VER)
-static __stdcall unsigned run_thread(void *data)
+static unsigned __stdcall run_thread(void *data)
 {
 	struct async *async = data;
 	return async->proc(async->fd_for_proc, async->data);
 }
-#endif
+#endif /* __MINGW32__ || _MSC_VER */
 
 int start_async(struct async *async)
 {
Signature · 1 line
1.6.4.msysgit.0
author
#3 lore raw

PATCH 9/11 Add MSVC porting header files.

Add unix head file, dirent.h, unistd.h and time.h Add MSVC special porting head file msvc.h and msvc.c.

---
 compat/msvc.c                   |   33 ++++++++++
 compat/msvc.h                   |   95 +++++++++++++++++++++++++++++
 compat/vcbuild/include/dirent.h |  127 +++++++++++++++++++++++++++++++++++++++
 compat/vcbuild/include/unistd.h |   92 ++++++++++++++++++++++++++++
 compat/vcbuild/sys/time.h       |   21 +++++++
 git-compat-util.h               |   12 ++++-
 6 files changed, 379 insertions(+), 1 deletions(-)
 create mode 100644 compat/msvc.c
 create mode 100644 compat/msvc.h
 create mode 100644 compat/vcbuild/include/dirent.h
 create mode 100644 compat/vcbuild/include/unistd.h
 create mode 100644 compat/vcbuild/sys/time.h
compat/msvc.c new file +33 -0
new file mode 100644
index 0000000..80afd4d
@@ -0,0 +1,33 @@
+#include "../git-compat-util.h"
+#include "win32.h"
+#include <conio.h>
+#include "../strbuf.h"
+
+DIR *opendir(const char *name)
+{
+	int len;
+	DIR *p;
+	p = (DIR*)malloc(sizeof(DIR));
+	memset(p, 0, sizeof(DIR));
+	strncpy(p->dd_name, name, PATH_MAX);
+	len = strlen(p->dd_name);
+	p->dd_name[len] = '/';
+	p->dd_name[len+1] = '*';
+
+	if (p == NULL)
+		return NULL;
+
+	p->dd_handle = _findfirst(p->dd_name, &p->dd_dta);
+
+	if (p->dd_handle == -1) {
+		free(p);
+		return NULL;
+	}
+	return p;
+}
+int closedir(DIR *dir)
+{
+	_findclose(dir->dd_handle);
+	free(dir);
+	return 0;
+}
compat/msvc.h new file +95 -0

96 lines not on this page · raw message

compat/vcbuild/include/dirent.h new file +127 -0

127 lines not on this page · raw message

compat/vcbuild/include/unistd.h new file +92 -0

93 lines not on this page · raw message

compat/vcbuild/sys/time.h new file +21 -0
new file mode 100644
index 0000000..6ed82c0
@@ -0,0 +1,21 @@
+#ifndef	_UTIME_H_
+#define	_UTIME_H_
+/*
+ * Structure used by _utime function.
+ */
+struct _utimbuf
+{
+	time_t	actime;		/* Access time */
+	time_t	modtime;	/* Modification time */
+};
+
+#ifndef	_NO_OLDNAMES
+/* NOTE: Must be the same as _utimbuf above. */
+struct utimbuf
+{
+	time_t	actime;
+	time_t	modtime;
+};
+#endif	/* Not _NO_OLDNAMES */
+
+#endif
git-compat-util.h +11 -1
index 9f941e4..cb89294 100644
@@ -77,8 +77,10 @@
 #include <string.h>
 #include <errno.h>
 #include <limits.h>
+#ifndef _MSC_VER
 #include <sys/param.h>
 #include <sys/types.h>
+#endif
 #include <dirent.h>
 #include <sys/time.h>
 #include <time.h>
@@ -86,7 +88,12 @@
 #include <fnmatch.h>
 #include <assert.h>
 #include <regex.h>
+
+#ifndef _MSC_VER
 #include <utime.h>
+#endif
+
+#ifndef _MSC_VER
 #ifndef __MINGW32__
 #include <sys/wait.h>
 #include <sys/poll.h>
@@ -114,7 +121,10 @@
 #else 	/* __MINGW32__ */
 /* pull in Windows compatibility stuff */
 #include "compat/mingw.h"
-#endif	/* __MINGW32__ */
+#endif  /* __MINGW32__ */
+#else   /* _MSC_VER */
+#include "compat/msvc.h"
+#endif	/* _MSC_VER */
 
 #ifndef NO_LIBGEN_H
 #include <libgen.h>
Signature · 1 line
1.6.4.msysgit.0
author
#4 lore raw

PATCH 10/11 Add MSVC Project file

Add libgit.vcproj to build common library.
Add git.vcproj to build git program.

---
 compat/vcbuild/git/git.vcproj       |  197 +++++
 compat/vcbuild/libgit/libgit.vcproj | 1347 +++++++++++++++++++++++++++++++++++
 2 files changed, 1544 insertions(+), 0 deletions(-)
 create mode 100644 compat/vcbuild/git/git.vcproj
 create mode 100644 compat/vcbuild/libgit/libgit.vcproj
compat/vcbuild/git/git.vcproj new file +197 -0
new file mode 100644
index 0000000..6f85de3
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="gb2312"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9.00"
+	Name="git"
+	ProjectGUID="{E3E30E51-C5AD-407B-AB43-985E4111474A}"
+	RootNamespace="git"
+	Keyword="Win32Proj"
+	TargetFrameworkVersion="196613"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="0"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wininet.lib ws2_32.lib "
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="0"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				EnableIntrinsicFunctions="true"
+				AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wininet.lib ws2_32.lib "
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\..\..\git.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
compat/vcbuild/libgit/libgit.vcproj new file +1347 -0

1,347 lines not on this page · raw message

Signature · 1 line
1.6.4.msysgit.0
#5 lore raw

Re: [PATCH 10/11] Add MSVC Project file

I don't know if this is in any way feasible (does not seem to hard actually), but I think these files should be automatically generated.

Otherwise, bitrot is going to happen in zero time.

Also, a cleaner XML without verbosities like

+ <Tool
+ Name="VCMIDLTool"
+ />

would make the patch easier to review.

I agree with dscho on the non-builtins.

Paolo

#6 lore raw

Re: [PATCH 10/11] Add MSVC Project file

Quoted 7 lines · Paolo Bonzini

Also, a cleaner XML without verbosities like

+                       <Tool
+                               Name="VCMIDLTool"
+                       />

would make the patch easier to review.

...but will it make it more annoying to maintain in the long run? It might be painful to work with a mixture of hand-written and msdev-written XML. Of course, if we get some scripts in place to generate the vcproj-files this might not be a problem...

Signature · 3 lines
Erik "kusma" Faye-Lund
[email protected]
(+47) 986 59 656
#7 lore raw

Re: [PATCH 10/11] Add MSVC Project file

Quoted 7 lines · Erik Faye-Lund
Quoted 6 lines · Paolo Bonzini

Also, a cleaner XML without verbosities like

+<Tool

(quoted diff) +2 -0
+                               Name="VCMIDLTool"
+                       />
Quoted 6 lines
Quoted 1 line

would make the patch easier to review.

...but will it make it more annoying to maintain in the long run? It might be painful to work with a mixture of hand-written and msdev-written XML. Of course, if we get some scripts in place to generate the vcproj-files this might not be a problem...

Yes, my remark applied only if the generation was scripted. Otherwise, it would be an annoyance in addition to being subject to bitrot.

Paolo

#8 lore raw

Re: [PATCH 10/11] Add MSVC Project file

In reply to Erik Faye-Lund

Hi,

Quoted 7 lines · Erik Faye-Lund
Quoted 6 lines · Paolo Bonzini

Also, a cleaner XML without verbosities like

+                       <Tool
+                               Name="VCMIDLTool"
+                       />

Quoted 6 lines
Quoted 1 line

would make the patch easier to review.

...but will it make it more annoying to maintain in the long run? It might be painful to work with a mixture of hand-written and msdev-written XML. Of course, if we get some scripts in place to generate the vcproj-files this might not be a problem...

I think the killer argument against such a script (I actually though of that myself, but decided against it for that very reason) is that the result is to be used by Microsoft Visual Studio users, who do not typically have a scripting language, and who would not want to use it anyway.

Of course, we could have a script that verifies that the .vcproj files contain reference the appropriate files (which it would know about by being called from the Makefile and being passed the file names), maybe even be able to edit the .vcproj file if it is missing some. Should not be too hard in Perl.

Ciao,
Dscho

#9 lore raw

Re: [PATCH 10/11] Add MSVC Project file

Quoted 5 lines · Johannes Schindelin

Of course, we could have a script that verifies that the .vcproj files contain reference the appropriate files (which it would know about by being called from the Makefile and being passed the file names), maybe even be able to edit the .vcproj file if it is missing some.  Should not be too hard in Perl.

You'll need to special-case for Visual C++ 2010, which is different and incompatible with previous versions. Hence my suggestion for
CMake: appropriate project files would be generated for the tool the user chooses, be it VC++ 2005, VC++2010, gcc, Borland C++ or anything else.

Signature · 3 lines
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
#10 lore raw

Re: [PATCH 10/11] Add MSVC Project file

2009/8/17 Pau Garcia i Quiles <[email protected]>:

Quoted 9 lines
Quoted 5 lines · Johannes Schindelin

Of course, we could have a script that verifies that the .vcproj files contain reference the appropriate files (which it would know about by being called from the Makefile and being passed the file names), maybe even be able to edit the .vcproj file if it is missing some.  Should not be too hard in Perl.

Quoted 5 lines

You'll need to special-case for Visual C++ 2010, which is different and incompatible with previous versions. Hence my suggestion for
CMake: appropriate project files would be generated for the tool the user chooses, be it VC++ 2005, VC++2010, gcc, Borland C++ or anything else.

The problem is that you'd still need the Visual Studio projects (one each for 6, 7 (2002), 7.1 (2003), 8 (2005), 9 (2008) and 10 (2010) -- yes, there'll need to be one for each version of Visual Studio) as people who use Visual Studio tend to primarily use the IDE. CMake (which Windows users will need to download & install from somewhere) will sit outside this -- unless you mean making the project files be the "Makefile project" type and simply use it to invoke CMake and host the source files to ease access to them from the IDE?

Also, not every posix system will have CMake installed (e.g. Linux From Scratch systems) and that's not including "exotic" systems like Solaris and the *BSDs.

- Reece

#11 lore raw

Re: [PATCH 10/11] Add MSVC Project file

Quoted 16 lines · Reece Dunn

2009/8/17 Pau Garcia i Quiles <[email protected]>:

Quoted 9 lines
Quoted 5 lines · Johannes Schindelin

Of course, we could have a script that verifies that the .vcproj files contain reference the appropriate files (which it would know about by being called from the Makefile and being passed the file names), maybe even be able to edit the .vcproj file if it is missing some.  Should not be too hard in Perl.

Quoted 5 lines

You'll need to special-case for Visual C++ 2010, which is different and incompatible with previous versions. Hence my suggestion for
CMake: appropriate project files would be generated for the tool the user chooses, be it VC++ 2005, VC++2010, gcc, Borland C++ or anything else.

Quoted 8 lines

The problem is that you'd still need the Visual Studio projects (one each for 6, 7 (2002), 7.1 (2003), 8 (2005), 9 (2008) and 10 (2010) -- yes, there'll need to be one for each version of Visual Studio) as people who use Visual Studio tend to primarily use the IDE. CMake (which Windows users will need to download & install from somewhere) will sit outside this -- unless you mean making the project files be the "Makefile project" type and simply use it to invoke CMake and host the source files to ease access to them from the IDE?

If a CMake build system is provided, you will not need a single Visual Studio project, or the autotools build system, or anything else. Just CMake and the CMake build system (which are a bunch of CMakeLists.txt plain text files).

CMake takes the CMakeLists.txt file(s) as the input and generates makefiles for gcc, vcproj files for Visual C++, makefiles for NMake, Eclipse projects for Eclipse, XCode projects for XCode, etc.

Quoted 3 lines

Also, not every posix system will have CMake installed (e.g. Linux From Scratch systems) and that's not including "exotic" systems like Solaris and the *BSDs.

CMake is available for many platforms (Linux x86-32 and x86-64, PPC, Solaris Sparc, HP-UX, Irix, AIX PPC) as a binary from the CMake site (
http://cmake.org/cmake/resources/software.html ) and as source for the rest.

*BSD? It is available in the ports section (and maybe as a binary, too) in FreeBSD(
http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/cmake/ ), NetBSD and OpenBSD.

Linux from scratch? If people are brave enough to build and use LFS, they are brave enough to build CMake (CMake is autocontained and bootstraps itself, it only depends on a C++ compiler to build itself).

Signature · 3 lines
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
#12 lore raw

Re: [PATCH 10/11] Add MSVC Project file

2009/8/17 Pau Garcia i Quiles <[email protected]>:

Quoted 26 lines · Reece Dunn
Quoted 16 lines

2009/8/17 Pau Garcia i Quiles <[email protected]>:

Quoted 9 lines
Quoted 5 lines · Johannes Schindelin

Of course, we could have a script that verifies that the .vcproj files contain reference the appropriate files (which it would know about by being called from the Makefile and being passed the file names), maybe even be able to edit the .vcproj file if it is missing some.  Should not be too hard in Perl.

Quoted 5 lines

You'll need to special-case for Visual C++ 2010, which is different and incompatible with previous versions. Hence my suggestion for
CMake: appropriate project files would be generated for the tool the user chooses, be it VC++ 2005, VC++2010, gcc, Borland C++ or anything else.

Quoted 8 lines

The problem is that you'd still need the Visual Studio projects (one each for 6, 7 (2002), 7.1 (2003), 8 (2005), 9 (2008) and 10 (2010) -- yes, there'll need to be one for each version of Visual Studio) as people who use Visual Studio tend to primarily use the IDE. CMake (which Windows users will need to download & install from somewhere) will sit outside this -- unless you mean making the project files be the "Makefile project" type and simply use it to invoke CMake and host the source files to ease access to them from the IDE?

Quoted 4 lines

If a CMake build system is provided, you will not need a single Visual Studio project, or the autotools build system, or anything else. Just CMake and the CMake build system (which are a bunch of CMakeLists.txt plain text files).

Note that I said that people who use Visual Studio are more likely to build and develop things through the Visual Studio IDE. Unless there is IDE integration for it, they are not likely to use it.

For an automated build, CMake would probably work.

Looking around, it seems that CMake on Windows assumes that Microsoft Visual C is used; that is, you have to explicitly specify CC for MinGW or cygwin to build.

Quoted 13 lines

CMake takes the CMakeLists.txt file(s) as the input and generates makefiles for gcc, vcproj files for Visual C++, makefiles for NMake, Eclipse projects for Eclipse, XCode projects for XCode, etc.

Quoted 3 lines

Also, not every posix system will have CMake installed (e.g. Linux From Scratch systems) and that's not including "exotic" systems like Solaris and the *BSDs.

CMake is available for many platforms (Linux x86-32 and x86-64, PPC, Solaris Sparc, HP-UX, Irix, AIX PPC) as a binary from the CMake site (
http://cmake.org/cmake/resources/software.html ) and as source for the rest.

Quoted 4 lines

*BSD? It is available in the ports section (and maybe as a binary, too) in FreeBSD(
http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/cmake/ ), NetBSD and OpenBSD.

Ok, I stand corrected there.

Quoted 3 lines

Linux from scratch? If people are brave enough to build and use LFS, they are brave enough to build CMake (CMake is autocontained and bootstraps itself, it only depends on a C++ compiler to build itself).

At what about at the bootstrap stage? A C compiler will be available, but a C++ one may not.

- Reece

#13 lore raw

Re: [PATCH 10/11] Add MSVC Project file

Reece Dunn schreef:

Quoted 3 lines

Note that I said that people who use Visual Studio are more likely to build and develop things through the Visual Studio IDE. Unless there is IDE integration for it, they are not likely to use it.

CMake generates a .vcproj file for visual studio, so users who want to use the IDE let CMake generate the .vcproj file and then use the IDE to debug git. There could be a batchfile like /vc_build/make_vs_files.bat or something to make it easy for VS users using the IDE.

#14 lore raw

Re: [PATCH 10/11] Add MSVC Project file

In reply to Pau Garcia i Quiles

Hi,

Quoted 26 lines · Pau Garcia i Quiles
Quoted 16 lines · Reece Dunn

2009/8/17 Pau Garcia i Quiles <[email protected]>:

Quoted 9 lines
Quoted 5 lines · Johannes Schindelin

Of course, we could have a script that verifies that the .vcproj files contain reference the appropriate files (which it would know about by being called from the Makefile and being passed the file names), maybe even be able to edit the .vcproj file if it is missing some.  Should not be too hard in Perl.

Quoted 5 lines

You'll need to special-case for Visual C++ 2010, which is different and incompatible with previous versions. Hence my suggestion for
CMake: appropriate project files would be generated for the tool the user chooses, be it VC++ 2005, VC++2010, gcc, Borland C++ or anything else.

Quoted 8 lines

The problem is that you'd still need the Visual Studio projects (one each for 6, 7 (2002), 7.1 (2003), 8 (2005), 9 (2008) and 10 (2010) -- yes, there'll need to be one for each version of Visual Studio) as people who use Visual Studio tend to primarily use the IDE. CMake (which Windows users will need to download & install from somewhere) will sit outside this -- unless you mean making the project files be the "Makefile project" type and simply use it to invoke CMake and host the source files to ease access to them from the IDE?

Quoted 4 lines

If a CMake build system is provided, you will not need a single Visual Studio project, or the autotools build system, or anything else. Just CMake and the CMake build system (which are a bunch of CMakeLists.txt plain text files).

You are putting an undue burden on the already overloaded maintainer.

Well, let's see if you can provide a /src/cmake/release.sh that compiles CMake from scratch, and _then_ I'll look into CMake again.

Ciao,
Dscho

#15 lore raw

Re: [PATCH 10/11] Add MSVC Project file

Quoted 30 lines · Johannes Schindelin

Hi,

Quoted 26 lines · Pau Garcia i Quiles
Quoted 24 lines · Reece Dunn

2009/8/17 Pau Garcia i Quiles <[email protected]>:

Quoted 9 lines
Quoted 5 lines · Johannes Schindelin

Of course, we could have a script that verifies that the .vcproj files contain reference the appropriate files (which it would know about by being called from the Makefile and being passed the file names), maybe even be able to edit the .vcproj file if it is missing some.  Should not be too hard in Perl.

Quoted 5 lines

You'll need to special-case for Visual C++ 2010, which is different and incompatible with previous versions. Hence my suggestion for
CMake: appropriate project files would be generated for the tool the user chooses, be it VC++ 2005, VC++2010, gcc, Borland C++ or anything else.

The problem is that you'd still need the Visual Studio projects (one each for 6, 7 (2002), 7.1 (2003), 8 (2005), 9 (2008) and 10 (2010) -- yes, there'll need to be one for each version of Visual Studio) as people who use Visual Studio tend to primarily use the IDE. CMake (which Windows users will need to download & install from somewhere) will sit outside this -- unless you mean making the project files be the "Makefile project" type and simply use it to invoke CMake and host the source files to ease access to them from the IDE?

Quoted 6 lines
Quoted 4 lines

If a CMake build system is provided, you will not need a single Visual Studio project, or the autotools build system, or anything else. Just CMake and the CMake build system (which are a bunch of CMakeLists.txt plain text files).

You are putting an undue burden on the already overloaded maintainer.

Sorry, but I'm a bit lost now. What maintainer are we talking about now? Junio?

As I would be providing a turn-key CMake build system, the only burden I would be putting on the maintainer would be learning CMake.

Given that I'm providing a comprehensive (100+ slides) CMake tutorial ( http://www.elpauer.org/stuff/learning_cmake.pdf ) , which I use in my CMake workshops, I think I'm making that burden a bit lighter.

If the next git conference is somewhere in Europe, I could also fly there and we'd have a CMake tutorial, if people would feel more comfortable that way.

Quoted 2 lines

Well, let's see if you can provide a /src/cmake/release.sh that compiles CMake from scratch, and _then_ I'll look into CMake again.

Again, I'm a bit lost. What '/src/cmake/release.sh' are we talking about now? Would that be part of CMake or git ?

If you want to build CMake from scratch, you only need to download the source from http://cmake.org/cmake/resources/software.html , then run "./bootstrap" in the source directory. That's true for every platform but Visual C++, which requires you to download a pre-built CMake binary to build CMake.

If you mean you want to bootstrap git (i. e. download the git tarball, which would include the CMake sources, then bootstrap CMake, then build git using the CMake build system), I'd say that makes no sense at all. That would be like saying you want to include the autotools sources, the OpenSSL sources, the curl sources, the Subversion sources, etc in the git tarball. Insane.

Signature · 3 lines
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
#16 lore raw

Re: [PATCH 10/11] Add MSVC Project file

Hi,

Quoted 7 lines · Pau Garcia i Quiles
Quoted 1 line · Johannes Schindelin

You are putting an undue burden on the already overloaded maintainer.

Sorry, but I'm a bit lost now. What maintainer are we talking about now? Junio?

I was talking about me, as maintainer of msysGit.

Quoted 10 lines

As I would be providing a turn-key CMake build system, the only burden I would be putting on the maintainer would be learning CMake.

Given that I'm providing a comprehensive (100+ slides) CMake tutorial ( http://www.elpauer.org/stuff/learning_cmake.pdf ) , which I use in my CMake workshops, I think I'm making that burden a bit lighter.

If the next git conference is somewhere in Europe, I could also fly there and we'd have a CMake tutorial, if people would feel more comfortable that way.

This is exactly what I mean by burden. Why do I have to learn a new system, and suffer the hassle of integrating it into the current build system, which works quite well thankyouverymuch?

Never run a changing system.

Quoted 5 lines
Quoted 2 lines

Well, let's see if you can provide a /src/cmake/release.sh that compiles CMake from scratch, and _then_ I'll look into CMake again.

Again, I'm a bit lost. What '/src/cmake/release.sh' are we talking about now? Would that be part of CMake or git ?

Maybe this:

http://article.gmane.org/gmane.comp.version-control.git/126286

and this:

http://repo.or.cz/w/msysgit.git?a=blob;f=src/curl/release.sh;h=d7516cbf6e92af4de138ce405d88561fbe1e92a8;hb=968336eddac1874c56cd934d10783566af5a3e26

helps.

To quote myself (as you appear to have missed that):

Having said that, a CMake-based system _in addition_ to what is tried-and-tested to be able to support all those different kinds of Microsoft Visual Studio (took me 3 attempts to write that without a Freudian) would be welcome, _if_ you succeed in making it compile out of the box on msysGit.

By out-of-the-box I mean: you send a patch that adds /src/cmake/release.sh, I apply the patch (after briefly scanning
that it does not install a backdoor on a machine that is not even
mine, and therefore will never see even a single of my passwords typed in), run it, it compiles installs and commits cmake and cmake works.

Short form: if you make it easy for me, I will look at it again, if you make it hard on me, you will just have done to me what you now try to avoid yourself: wasted time.

Ciao,
Dscho

#17 lore raw

Re: [PATCH 10/11] Add MSVC Project file

Quoted 21 lines · Johannes Schindelin

Hi,

Quoted 7 lines · Pau Garcia i Quiles
Quoted 1 line · Johannes Schindelin

You are putting an undue burden on the already overloaded maintainer.

Sorry, but I'm a bit lost now. What maintainer are we talking about now? Junio?

I was talking about me, as maintainer of msysGit.

Quoted 7 lines

As I would be providing a turn-key CMake build system, the only burden I would be putting on the maintainer would be learning CMake.

Given that I'm providing a comprehensive (100+ slides) CMake tutorial ( http://www.elpauer.org/stuff/learning_cmake.pdf ) , which I use in my CMake workshops, I think I'm making that burden a bit lighter.

Quoted 7 lines
Quoted 3 lines

If the next git conference is somewhere in Europe, I could also fly there and we'd have a CMake tutorial, if people would feel more comfortable that way.

This is exactly what I mean by burden.  Why do I have to learn a new system, and suffer the hassle of integrating it into the current build system, which works quite well thankyouverymuch?

Because it works for every platform, including Visual C++, where a Bourne shell is not available and where you currently need to maintain a different built system.

Quoted 26 lines

Never run a changing system.

Quoted 5 lines
Quoted 2 lines

Well, let's see if you can provide a /src/cmake/release.sh that compiles CMake from scratch, and _then_ I'll look into CMake again.

Again, I'm a bit lost. What '/src/cmake/release.sh' are we talking about now? Would that be part of CMake or git ?

Maybe this:

http://article.gmane.org/gmane.comp.version-control.git/126286

and this:

http://repo.or.cz/w/msysgit.git?a=blob;f=src/curl/release.sh;h=d7516cbf6e92af4de138ce405d88561fbe1e92a8;hb=968336eddac1874c56cd934d10783566af5a3e26

helps.

To quote myself (as you appear to have missed that):

       Having said that, a CMake-based system _in addition_ to what is tried-and-tested to be able to support all those different kinds of Microsoft Visual Studio (took me 3 attempts to write that without a Freudian) would be welcome, _if_ you succeed in making it compile out of the box on msysGit.

Quoted 6 lines

       By out-of-the-box I mean: you send a patch that adds /src/cmake/release.sh, I apply the patch (after briefly scanning that it does not install a backdoor on a machine that is not even mine, and therefore will never see even a single of my passwords typed in), run it, it compiles installs and commits cmake and cmake works.

Hmmm indeed I have missed a lot, thanks. A lot of what you had written in other e-mails was being hidden by GMail as "quoted" text :-/

It seems we are talking about two different things here. I'm talking about getting the CMake-based build system in git.git, you are talking about msysgit. If getting into msysgit is the first step to getting into git.git, I'll start from msysgit. Are the differences between both branches so big they cannot be merged into a single branch yet ?

Quoted 3 lines

Short form: if you make it easy for me, I will look at it again, if you make it hard on me, you will just have done to me what you now try to avoid yourself: wasted time.

Let's see what I can do.

Signature · 3 lines
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
#21 lore raw

Re: [PATCH 10/11] Add MSVC Project file

In reply to Pau Garcia i Quiles

Hi,

Quoted 11 lines · Pau Garcia i Quiles
Quoted 5 lines · Johannes Schindelin

Of course, we could have a script that verifies that the .vcproj files contain reference the appropriate files (which it would know about by being called from the Makefile and being passed the file names), maybe even be able to edit the .vcproj file if it is missing some.  Should not be too hard in Perl.

You'll need to special-case for Visual C++ 2010, which is different and incompatible with previous versions.

Ah, my beloved Microsoft time tax!

Quoted 3 lines

Hence my suggestion for CMake: appropriate project files would be generated for the tool the user chooses, be it VC++ 2005, VC++2010, gcc, Borland C++ or anything else.

The problem is that this will bitrot even more, as nobody will use it for gcc, Borland C++, XCode, Eclipse or anything else, except for Microsoft Visual C++.

Ciao,
Dscho

#22 lore raw

Re: [PATCH 10/11] Add MSVC Project file

Quoted 13 lines · Johannes Schindelin

Hi,

Quoted 9 lines · Pau Garcia i Quiles
Quoted 5 lines · Johannes Schindelin

Of course, we could have a script that verifies that the .vcproj files contain reference the appropriate files (which it would know about by being called from the Makefile and being passed the file names), maybe even be able to edit the .vcproj file if it is missing some.  Should not be too hard in Perl.

Quoted 4 lines
Quoted 2 lines

You'll need to special-case for Visual C++ 2010, which is different and incompatible with previous versions.

Ah, my beloved Microsoft time tax!

Sorry, but I make a living developing cross-platform software and porting stuff among any funny combination of Linux, Windows, gcc, mingw, Intel C++ and Visual C++ you can think of. CMake makes my life easier (possible!). Given that the patches we are talking about happen to add support for Visual C++, I'd say it stepped in at the right moment.

Quoted 7 lines
Quoted 3 lines

Hence my suggestion for CMake: appropriate project files would be generated for the tool the user chooses, be it VC++ 2005, VC++2010, gcc, Borland C++ or anything else.

The problem is that this will bitrot even more, as nobody will use it for gcc, Borland C++, XCode, Eclipse or anything else, except for Microsoft Visual C++.

How do you know? Also, please note I'm not talking about *adding* a CMake build system, I'm talking about *replacing* the existing autotools build system with a CMake build system, even if they coexist for some time.

What would be the point of having two build-systems, one (autotools) useless for Visual C++, the other one (CMake) apt for every platform ?

Signature · 3 lines
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
#23 lore raw

Re: [PATCH 10/11] Add MSVC Project file

Hi,

Quoted 11 lines · Pau Garcia i Quiles
Quoted 3 lines · Johannes Schindelin

The problem is that this will bitrot even more, as nobody will use it for gcc, Borland C++, XCode, Eclipse or anything else, except for Microsoft Visual C++.

How do you know? Also, please note I'm not talking about *adding* a CMake build system, I'm talking about *replacing* the existing autotools build system with a CMake build system, even if they coexist for some time.

You are mistaken. We do not require using the autotools. I _never_ call "./configure" yet the Makefile magically works. Cool, huh?

But here's a clue: you will probably _never_ succeed in getting a replacement of the make-based build in git.git by the maintainer. Make is just too ubiquitous and well-established for that.

Having said that, a CMake-based system _in addition_ to what is tried-and-tested to be able to support all those different kinds of Microsoft Visual Studio (took me 3 attempts to write that without a Freudian) would be welcome, _if_ you succeed in making it compile out of the box on msysGit.

By out-of-the-box I mean: you send a patch that adds /src/cmake/release.sh, I apply the patch (after briefly scanning that it does not install a backdoor on a machine that is not even mine, and therefore will never see even a single of my passwords typed in), run it, it compiles installs and commits cmake and cmake works.

If that's not possible, I refuse to add another problem rather than solving one.

If you succeed, I will ask you to do the same for Python, as you clearly proved by that point that you are a magician.

Ciao,
Dscho

#28 lore raw

Re: [PATCH 10/11] Add MSVC Project file

In reply to Johannes Schindelin
Quoted 6 lines

I think the killer argument against such a script (I actually though of that myself, but decided against it for that very reason) is that the result is to be used by Microsoft Visual Studio users, who do not typically have a scripting language, and who would not want to use it anyway.

But the script could run whenever the Makefile is updated, even under Unix. Of course, there are chances of bitrotting, but it cannot be worse than having failures every time a builtin is added or otherwise a file is added.

The main problem I see with the script is that the output would naturally be a .gitignore-d file, but it will not be for the reason you mention.

Quoted 5 lines

Of course, we could have a script that verifies that the .vcproj files contain reference the appropriate files (which it would know about by being called from the Makefile and being passed the file names), maybe even be able to edit the .vcproj file if it is missing some. Should not be too hard in Perl.

Yes, it's not very far from what I had in mind.

Paolo

#29 lore raw

Re: [PATCH 10/11] Add MSVC Project file

Hi,

Quoted 8 lines · Paolo Bonzini
Quoted 5 lines

I think the killer argument against such a script (I actually though of that myself, but decided against it for that very reason) is that the result is to be used by Microsoft Visual Studio users, who do not typically have a scripting language, and who would not want to use it anyway.

But the script could run whenever the Makefile is updated, even under Unix.

But that would have to be kept in mind by the maintainer, and he could not test it.

Besides, IIUC you were proposing a generator, while I suggested a rewriter. My idea would require much less work, as the changes to the original, known good, .vcproj are minimal.

So let's have a script (if anybody feels compelled enough) that we can run from time to time and when it updates at least one of the .vcproj file, we throw the result at Frank Li for testing.

Ciao,
Dscho

#63 lore raw

Re: [PATCH 10/11] Add MSVC Project file

In reply to Frank Li

Hi,

Quoted 4 lines · Frank Li

Add libgit.vcproj to build common library.
Add git.vcproj to build git program.

The commit subject should read "... files", as you add two files, not one.

I hope that somebody else is going to review this patch...

And don't you lack .vcproj files for the non-builtins?

Ciao,
Dscho

#68 lore raw

Re: [msysGit] [PATCH 09/11] Add MSVC porting header files.

In reply to Frank Li
Quoted 7 lines · Frank Li
compat/msvc.h new file +1 -0
new file mode 100644
index 0000000..6071565
@@ -0,0 +1,95 @@
+#ifndef __MSVC__HEAD

...

Quoted 2 lines

+#endif
\ No newline at end of file

Please fix these "No newline at end of file" an all cases (I quoted only one instance where I saw this).

-- Hannes

#69 lore raw

Re: [PATCH 09/11] Add MSVC porting header files.

In reply to Frank Li

Hi,

Quoted 1 line · Frank Li

Add unix head file, dirent.h, unistd.h and time.h

These are copied from somewhere. From where? What is the license?

Quoted 1 line

Add MSVC special porting head file msvc.h and msvc.c.

This is added by you. Logically, that should be a separate patch.

Quoted 36 lines
compat/msvc.h new file +30 -0
new file mode 100644
index 0000000..6071565
@@ -0,0 +1,95 @@
+#ifndef __MSVC__HEAD
+#define __MSVC__HEAD
+
+#define WINVER 0x0500
+#define _WIN32_WINNT 0x0500
+#define _WIN32_WINDOWS 0x0410
+#define _WIN32_IE 0x0700
+#define NTDDI_VERSION NTDDI_WIN2KSP1
+#include <winsock2.h>
+
+/*Configuration*/
+
+#define NO_PREAD
+#define NO_OPENSSL
+#define NO_LIBGEN_H
+#define NO_SYMLINK_HEAD
+#define NO_IPV6
+#define NO_SETENV
+#define NO_UNSETENV
+#define NO_STRCASESTR
+#define NO_STRLCPY
+#define NO_MEMMEM
+#define NO_C99_FORMAT
+#define NO_STRTOUMAX
+#define NO_MKDTEMP
+#define NO_MKSTEMPS
+
+#define RUNTIME_PREFIX
+#define NO_ST_BLOCKS_IN_STRUCT_STAT
+#define NO_NSEC

compat/msvc.h line 40

Quoted 10 lines
compat/msvc.h new file +10 -0
+#define USE_WIN32_MMAP
+#define USE_NED_ALLOCATOR
+
+#define NO_REGEX
+
+#define NO_SYS_SELECT_H
+#define NO_PTHEADS
+#define HAVE_STRING_H 1
+#define STDC_HEADERS
+#define NO_ICONV

These would normally be defined in the Makefile. You might want to state that in a comment.

Or maybe move the definitions (along with vsnprintf) to the .vcproj file, which is the logical pendant of the Makefile?

compat/msvc.h line 43

Quoted 2 lines
compat/msvc.h new file +2 -0
+#define inline __inline
+#define __inline__ __inline

These definitions are unrelated to the surrounding ones; please move them elsewhere.

Quoted 17 lines
compat/msvc.h new file +17 -0
+
+#define SNPRINTF_RETURNS_BOGUS
+
+#define SHA1_HEADER "mozilla-sha1\\sha1.h"
+
+#define ETC_GITCONFIG "%HOME%"
+
+#define NO_PTHREADS
+#define NO_CURL
+
+
+#define NO_STRTOUMAX
+#define REGEX_MALLOC
+
+
+#define GIT_EXEC_PATH "bin"
+#define GIT_VERSION "1.6"

compat/msvc.h line 70

Quoted 10 lines
compat/msvc.h new file +10 -0
+#define BINDIR "bin"
+#define PREFIX "."
+#define GIT_MAN_PATH "man"
+#define GIT_INFO_PATH "info"
+#define GIT_HTML_PATH "html"
+#define DEFAULT_GIT_TEMPLATE_DIR "templates"
+
+#define NO_STRLCPY
+#define NO_UNSETENV
+#define NO_SETENV

Would these NO_ definitions not _love_ to be close to their siblings?

What is the reason for those empty lines? Their placement and amount look rather arbitrary to me.

compat/msvc.h line 78

Quoted 7 lines
compat/msvc.h new file +7 -0
+#define strdup _strdup
+#define read _read
+#define close _close
+#define dup _dup
+#define dup2 _dup2
+#define strncasecmp _strnicmp
+#define strtoull _strtoui64

vsnprintf could go right here.

compat/msvc.h line 80

Quoted 1 line
compat/msvc.h new file +1 -0
+#define __attribute__(x)

The two inline definitions could go right here.

Quoted 4 lines
compat/msvc.h new file +4 -0
+static __inline int strcasecmp (const char *s1, const char *s2)
+{
+	int size1=strlen(s1);
+	int sisz2=strlen(s2);

compat/msvc.h line 95

Quoted 10 lines
compat/msvc.h new file +10 -0
+
+	return _strnicmp(s1,s2,sisz2>size1?sisz2:size1);
+}
+
+#include "compat/mingw.h"
+#undef ERROR
+#undef stat
+#define stat(x,y) mingw_lstat
+#define stat      _stat64
+#endif

Looks much nicer now, thanks!

Ciao,
Dscho

#70 lore raw

Re: [PATCH 09/11] Add MSVC porting header files.

Quoted 50 lines
Quoted 36 lines
compat/msvc.h new file +30 -0
new file mode 100644
index 0000000..6071565
@@ -0,0 +1,95 @@
+#ifndef __MSVC__HEAD
+#define __MSVC__HEAD
+
+#define WINVER 0x0500
+#define _WIN32_WINNT 0x0500
+#define _WIN32_WINDOWS 0x0410
+#define _WIN32_IE 0x0700
+#define NTDDI_VERSION NTDDI_WIN2KSP1
+#include <winsock2.h>
+
+/*Configuration*/
+
+#define NO_PREAD
+#define NO_OPENSSL
+#define NO_LIBGEN_H
+#define NO_SYMLINK_HEAD
+#define NO_IPV6
+#define NO_SETENV
+#define NO_UNSETENV
+#define NO_STRCASESTR
+#define NO_STRLCPY
+#define NO_MEMMEM
+#define NO_C99_FORMAT
+#define NO_STRTOUMAX
+#define NO_MKDTEMP
+#define NO_MKSTEMPS
+
+#define RUNTIME_PREFIX
+#define NO_ST_BLOCKS_IN_STRUCT_STAT
+#define NO_NSEC

compat/msvc.h line 40

Quoted 10 lines
compat/msvc.h new file +10 -0
+#define USE_WIN32_MMAP
+#define USE_NED_ALLOCATOR
+
+#define NO_REGEX
+
+#define NO_SYS_SELECT_H
+#define NO_PTHEADS
+#define HAVE_STRING_H 1
+#define STDC_HEADERS
+#define NO_ICONV

These would normally be defined in the Makefile.  You might want to state that in a comment.

Quoted 2 lines

Or maybe move the definitions (along with vsnprintf) to the .vcproj file, which is the logical pendant of the Makefile?

What about having a CMake build system, which would work on every platform (including cross-compiling), and would produce an appropriate config.h and makefiles/vcproj/Eclipse projects/XCode projects/whatever is fit for each platform? If it's OK to include such a build system upstream, I'm volunteering to implement it.

Signature · 3 lines
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
#71 lore raw

Re: [msysGit] Re: [PATCH 09/11] Add MSVC porting header files.

Quoted 1 line · Pau Garcia i Quiles

What about having a CMake build system, ...

No, thank you. I have to use it for the little bit of KDE development that I do, and it is a horror. With autotools I at least was able to reuse my shell programming skills, but cmake is an entirely new language, and an absolutely horrible one (IMHO, of course).

-- Hannes

#72 lore raw

CMake, was Re: [PATCH 09/11] Add MSVC porting header files.

In reply to Pau Garcia i Quiles

Hi,

Quoted 5 lines · Pau Garcia i Quiles

What about having a CMake build system, which would work on every platform (including cross-compiling), and would produce an appropriate config.h and makefiles/vcproj/Eclipse projects/XCode projects/whatever is fit for each platform? If it's OK to include such a build system upstream, I'm volunteering to implement it.

And reap in another dependency?

First Python, then CMake, what tomorrow? Is it the month of adding dependencies?

Ciao,
Dscho

#73 lore raw

Re: CMake, was Re: [PATCH 09/11] Add MSVC porting header files.

Quoted 8 lines · Johannes Schindelin
Quoted 5 lines · Pau Garcia i Quiles

What about having a CMake build system, which would work on every platform (including cross-compiling), and would produce an appropriate config.h and makefiles/vcproj/Eclipse projects/XCode projects/whatever is fit for each platform? If it's OK to include such a build system upstream, I'm volunteering to implement it.

Quoted 4 lines

And reap in another dependency?

First Python, then CMake, what tomorrow?  Is it the month of adding dependencies?

I'd say it's the month of getting problems solved.

CMake would make git a lot easier to build on Windows, particularly with Visual C++. Replace autotools with CMake and suddenly you need to maintain a single build system for every platform and compiler git supports/will support. That's a sound advantage to me.

Signature · 3 lines
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
#74 lore raw

Re: CMake, was Re: [PATCH 09/11] Add MSVC porting header files.

Quoted 16 lines · Pau Garcia i Quiles
Quoted 8 lines · Johannes Schindelin
Quoted 5 lines · Pau Garcia i Quiles

What about having a CMake build system, which would work on every platform (including cross-compiling), and would produce an appropriate config.h and makefiles/vcproj/Eclipse projects/XCode projects/whatever is fit for each platform? If it's OK to include such a build system upstream, I'm volunteering to implement it.

Quoted 4 lines

And reap in another dependency?

First Python, then CMake, what tomorrow?  Is it the month of adding dependencies?

Quoted 6 lines

I'd say it's the month of getting problems solved.

CMake would make git a lot easier to build on Windows, particularly with Visual C++. Replace autotools with CMake and suddenly you need to maintain a single build system for every platform and compiler git supports/will support. That's a sound advantage to me.

I forgot to say CMake would be a build-dependency, not a runtime dependency, in case anyone is wondering.

More info about CMake:
http://www.cmake.org

Tutorial:
http://www.elpauer.org/stuff/learning_cmake.pdf

Signature · 3 lines
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
#75 lore raw

Re: CMake, was Re: [PATCH 09/11] Add MSVC porting header files.

In reply to Pau Garcia i Quiles

2009/8/17 Pau Garcia i Quiles <[email protected]>:

Quoted 16 lines
Quoted 8 lines · Johannes Schindelin
Quoted 5 lines · Pau Garcia i Quiles

What about having a CMake build system, which would work on every platform (including cross-compiling), and would produce an appropriate config.h and makefiles/vcproj/Eclipse projects/XCode projects/whatever is fit for each platform? If it's OK to include such a build system upstream, I'm volunteering to implement it.

Quoted 4 lines

And reap in another dependency?

First Python, then CMake, what tomorrow?  Is it the month of adding dependencies?

Quoted 6 lines

I'd say it's the month of getting problems solved.

CMake would make git a lot easier to build on Windows, particularly with Visual C++. Replace autotools with CMake and suddenly you need to maintain a single build system for every platform and compiler git supports/will support. That's a sound advantage to me.

Realistically, you'd need CMake for Windows/msvc and autotools for POSIX systems. I know that CMake is supported on POSIX, but not everyone has access to it. Poppler, for example, has this dual build system to support Windows as well as other systems (that, and it has KDE4 bindings, so CMake is pretty much a given).

For CMake to work, it would need to support building all of git (including the man, html and pdf documents from the asciidoc sources), the localisation support and the optional packages (OpenSSL, CURL). I know that KDE uses CMake, so this should all be possible.

- Reece

#76 lore raw

Re: CMake, was Re: [PATCH 09/11] Add MSVC porting header files.

Quoted 5 lines · Reece Dunn

Realistically, you'd need CMake for Windows/msvc and autotools for POSIX systems. I know that CMake is supported on POSIX, but not everyone has access to it. Poppler, for example, has this dual build system to support Windows as well as other systems (that, and it has KDE4 bindings, so CMake is pretty much a given).

It's not exactly like that. It would be more accurate to say "if you have POSIX, CMake will work; if you don't have POSIX, it may or may not work".

I'd say 99% of git users run git on a platform which supports enough POSIX to build CMake.

Please note if you are cross-compiling git, you need CMake (hence POSIX) on the platform you are cross-compiling on (the "host platform"), not on the platform you are cross-compiling for (the "target platform").

Quoted 4 lines

For CMake to work, it would need to support building all of git (including the man, html and pdf documents from the asciidoc sources), the localisation support and the optional packages (OpenSSL, CURL). I know that KDE uses CMake, so this should all be possible.

All possible. Plus using CMake would make easier to build installers (NSIS, WiX, .deb, .rpm, etc), submit the results of the tests to a dashboard ( http://my.cdash.org/ ), and more.

Signature · 3 lines
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
#77 lore raw

Re: CMake, was Re: [PATCH 09/11] Add MSVC porting header files.

In reply to Pau Garcia i Quiles

Hi,

Quoted 11 lines · Pau Garcia i Quiles
Quoted 8 lines · Johannes Schindelin
Quoted 5 lines · Pau Garcia i Quiles

What about having a CMake build system, which would work on every platform (including cross-compiling), and would produce an appropriate config.h and makefiles/vcproj/Eclipse projects/XCode projects/whatever is fit for each platform? If it's OK to include such a build system upstream, I'm volunteering to implement it.

Quoted 6 lines
Quoted 4 lines

And reap in another dependency?

First Python, then CMake, what tomorrow?  Is it the month of adding dependencies?

I'd say it's the month of getting problems solved.

What? I beg your _pardon_?

Quoted 4 lines

CMake would make git a lot easier to build on Windows, particularly with Visual C++. Replace autotools with CMake and suddenly you need to maintain a single build system for every platform and compiler git supports/will support. That's a sound advantage to me.

Well, I heard some pretty different opinions, and they are from quite recently.

In any case, before you get CMake to compile in msysGit, I think we do not need to talk about getting problems solved.

Ciao,
Dscho

#78 lore raw

Re: CMake, was Re: [PATCH 09/11] Add MSVC porting header files.

Quoted 2 lines

In any case, before you get CMake to compile in msysGit, I think we do not need to talk about getting problems solved.

At this moment I feel like developing a CMake build system for git would be a waste of time, it would never be accepted upstream. I'm not sure I want to spend my time in such an effort (it would easily take 2-3 days full time) and see it trashed. Sorry for being so clear, but I tend to contribute only to projects where my help and time are appreciated.

Signature · 3 lines
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
#83 lore raw

Re: [PATCH 08/11] Place __stdcall to correct position.

In reply to Frank Li

Hi,

Quoted 4 lines · Frank Li

MSVC require __stdcall is between return value and function name. ALL Win32 API definition is as TYPE WINAPI function name

How about "... to the correct ..." and "MSVC requires _stdcall to be between return value..." and "All Win32 API functions are declared with the WINAPI attribute."?

compat/mingw.c void mingw_open_html(const char *unixpath) · line 1149

Quoted 10 lines
compat/mingw.c +1 -1
index d5fa0ed..0c9c793 100644
@@ -1146,7 +1146,7 @@ void mingw_open_html(const char *unixpath)
 
 int link(const char *oldpath, const char *newpath)
 {
-	typedef BOOL WINAPI (*T)(const char*, const char*, LPSECURITY_ATTRIBUTES);
+	typedef  BOOL (WINAPI *T)(const char*, const char*, LPSECURITY_ATTRIBUTES);

An extra space slipped in, there.

Quoted 6 lines
run-command.c +0 -0
index df139da..423b506 100644
@@ -295,12 +295,12 @@ int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const
 }

run-command.c int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const · line 303

Quoted 10 lines
run-command.c +2 -2
 
 #if defined(__MINGW32__) || defined(_MSC_VER)
-static __stdcall unsigned run_thread(void *data)
+static unsigned __stdcall run_thread(void *data)
 {
 	struct async *async = data;
 	return async->proc(async->fd_for_proc, async->data);
 }
-#endif
+#endif /* __MINGW32__ || _MSC_VER */

I do not think this is necessary. There are only 5 lines wrapped into those #ifdef guards, the developer should be able to see that far.

Ciao,
Dscho

#86 lore raw

Re: [PATCH 07/11] Add O_BINARY flag to open flag at mingw.c

In reply to Frank Li

Hi,

Quoted 4 lines · Frank Li

Windows will convert CR\LF and union code at text mode. Git doesn't like this. Add O_BINARY flag to open function

How about this instead?

mingw.c: Use the O_BINARY flag to open files

On Windows, non-text files must be opened using the O_BINARY flag. MinGW does this for us automatically, but Microsoft Visual C++ does not.

Also, Johannes said that this would be a nice cleanup.

BTW what about fopen()?

Patch is obviously good.

Ciao,
Dscho

#89 lore raw
In reply to Frank Li
Quoted 14 lines · Frank Li
---
 compat/fnmatch/fnmatch.c |    4 ++++
 compat/regex/regex.c     |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
compat/fnmatch/fnmatch.c +0 -0
index 14feac7..5cbd49c 100644
@@ -16,6 +16,10 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite

330, Boston, MA 02111-1307, USA. */

compat/fnmatch/fnmatch.c line 21

Quoted 3 lines
compat/fnmatch/fnmatch.c +3 -0
+#ifdef _MSC_VER
+#include "git-compat-util.h"
+#endif

There is a *lot* to explain: Why the *heck* is this needed?

compat/regex/regex.c line 25

Quoted 11 lines
compat/regex/regex.c +3 -0
index 5728de1..2298a3a 100644
@@ -20,6 +20,10 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 /* AIX requires this to be the first thing in the file. */
+#ifdef _MSC_VER
+#include "git-compat-util.h"
+#endif

Same here.

-- Hannes

#90 lore raw
In reply to Frank Li

Hi,

Quoted 1 line · Frank Li

How about this instead?

Add missing git-compat-util.h to regex.c and fnmatch.c

This will be needed to compile with Microsoft Visual C++.

compat/fnmatch/fnmatch.c line 22

Quoted 12 lines
compat/fnmatch/fnmatch.c +4 -0
index 14feac7..5cbd49c 100644
@@ -16,6 +16,10 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifdef _MSC_VER
+#include "git-compat-util.h"
+#endif
+

Why not leave those #ifdef guards? Either they don't hurt, or they will hurt Microsoft Visual C++, too.

Ciao,
Dscho

#18 lore raw

Re: [PATCH 10/11] Add MSVC Project file

In reply to Pau Garcia i Quiles
Quoted 8 lines
Quoted 4 lines

This is exactly what I mean by burden. Why do I have to learn a new system, and suffer the hassle of integrating it into the current build system, which works quite well thankyouverymuch?

Because it works for every platform, including Visual C++, where a Bourne shell is not available and where you currently need to maintain a different built system.

But it comes with its own share of idiosyncracies. There are as many CMake haters as there are autotools haters.

I don't see CMake being used by git.git before hell freezes over. For msysgit, however, it may be an interesting approach.

Quoted 1 line

Let's see what I can do.

I'm also curious.

Paolo

#19 lore raw

Re: [PATCH 10/11] Add MSVC Project file

What about the common-cmds.h that is in the builtin-help.c? How it will be generated?I followed the instruction in ReadMe, but I couldn't compile because of this "missing" file.

#20 lore raw

Re: [PATCH 10/11] Add MSVC Project file

In reply to Paolo Bonzini

What about the common-cmds.h that is in the builtin-help.c? How it will be generated? I followed the instruction in ReadMe, but I couldn't compile because of this "missing" file.

#24 lore raw

Re: [PATCH 10/11] Add MSVC Project file

In reply to Johannes Schindelin

(Sorry for answering some parts now, I didn't realize this text was there before)

Quoted 3 lines

But here's a clue: you will probably _never_ succeed in getting a replacement of the make-based build in git.git by the maintainer.  Make is just too ubiquitous and well-established for that.

CMake does not replace Make, it runs a step before CMake

CMakeLists.txt

     |
     |
     |
     v
  Makefile/.vcproj/Eclipse/XCode project/NMakefile
     |
     |
     |
     v
 gcc/VC++/SunCC/whatever
     |
     |
     v

ld/link.exe/whatever

(see page 10 in my slides for a nicer version :-) )

Quoted 2 lines

If you succeed, I will ask you to do the same for Python, as you clearly proved by that point that you are a magician.

I can't do any Python whatsoever, sorry :-)

Signature · 3 lines
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
#25 lore raw

Re: [PATCH 10/11] Add MSVC Project file

In reply to Johannes Schindelin

Johannes Schindelin schreef:

Quoted 1 line

Having said that, a CMake-based system _in addition_ to what is tried-and-tested to be able to support all those different kinds of Microsoft Visual Studio (took me 3 attempts to write that without a Freudian) would be welcome, _if_ you succeed in making it compile out of the box on msysGit.

That would require (I think) that CMake is build by the msysgit gcc tools available in msysgit, since CMake can't be build by VS right? Pau do you think that is possible?

It would be fun. Download the msysgit netinstaller, set it up, install it, and after that, CMake is bootstrapped, and the visual studio .vcproj files are generated and everyone (VS developers and msys developers) are ready to go!

#26 lore raw

Re: [PATCH 10/11] Add MSVC Project file

Quoted 11 lines · Johan 't Hart

Johannes Schindelin schreef:

Quoted 5 lines

Having said that, a CMake-based system _in addition_ to what is tried-and-tested to be able to support all those different kinds of Microsoft Visual Studio (took me 3 attempts to write that without a Freudian) would be welcome, _if_ you succeed in making it compile out of the box on msysGit.

That would require (I think) that CMake is build by the msysgit gcc tools available in msysgit, since CMake can't be build by VS right? Pau do you think that is possible?

CMake can certainly be built by VC++ but you need CMake to do that, VC++-CMake cannot be bootstrapped.

Would it be OK to download a binary version of CMake instead of / in addition to the source? (I'm not familiar with the 'release.sh' stuff yet)

Quoted 4 lines

It would be fun. Download the msysgit netinstaller, set it up, install it, and after that, CMake is bootstrapped, and the visual studio .vcproj files are generated and everyone (VS developers and msys developers) are ready to go!

That'd be right, if I have understood what the netinstaller does (I've never used it yet).

Signature · 3 lines
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
#27 lore raw

Re: [PATCH 10/11] Add MSVC Project file

Hi,

Quoted 13 lines · Pau Garcia i Quiles
Quoted 11 lines · Johan 't Hart

Johannes Schindelin schreef:

Quoted 5 lines

Having said that, a CMake-based system _in addition_ to what is tried-and-tested to be able to support all those different kinds of Microsoft Visual Studio (took me 3 attempts to write that without a Freudian) would be welcome, _if_ you succeed in making it compile out of the box on msysGit.

That would require (I think) that CMake is build by the msysgit gcc tools available in msysgit, since CMake can't be build by VS right? Pau do you think that is possible?

Quoted 6 lines

CMake can certainly be built by VC++ but you need CMake to do that, VC++-CMake cannot be bootstrapped.

Would it be OK to download a binary version of CMake instead of / in addition to the source? (I'm not familiar with the 'release.sh' stuff yet)

Well, as I tried to establish msysGit as _the_ Git for Windows, I would be willing to created download bundles for Microsoft Visual C++ users, but only if the hassle is not big enough.

Read: if the procedure is a script that does not need to be supervised until it created a .zip or .7z file, I'm all for it.

Quoted 7 lines
Quoted 4 lines

It would be fun. Download the msysgit netinstaller, set it up, install it, and after that, CMake is bootstrapped, and the visual studio .vcproj files are generated and everyone (VS developers and msys developers) are ready to go!

That'd be right, if I have understood what the netinstaller does (I've never used it yet).

Or that.

Ciao,
Dscho

#30 lore raw

RFC 1/1 Enable compilation by Makefile for the MSVC toolchain

In reply to Johannes Schindelin

From: Marius Storm-Olsen <[email protected]>

By using GNU Make we can also compile with the MSVC toolchain. This is a rudementary patch, only meant as an RFC for now!!

!! DO NOT COMMIT THIS UPSTREAM !!
---
So, instead of rely on these vcproj files which *will* go stale, we can simply use the same Makefile system which everyone else is using. :) After all, we're just compiling with a different compiler. The end result will still rely on the *msysGit environment* to function, so we already require it. Thus, GNU Make is present, and we can use it.

This implementation is a quick hack to make it compile (hence the RFC subject), so please don't even consider basing anything ontop of it ;)

But, do point out all the do's and don'ts, and I'll try to polish it up to something which we can add to Frank's series..

 Makefile      |   97 +++++++++++++++++++++++++++++++++++++++++++++++---------
 compat/msvc.h |   77 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 158 insertions(+), 16 deletions(-)
Makefile +81 -16
index daf4296..2e14976 100644
@@ -214,9 +214,13 @@ uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
 
 CFLAGS = -g -O2 -Wall
 LDFLAGS =
+ARFLAGS = rcs\ # whitespace intentional
 ALL_CFLAGS = $(CFLAGS)
 ALL_LDFLAGS = $(LDFLAGS)
 STRIP ?= strip
+COMPFLAG = -c
+COBJFLAG = -o\ # whitespace intended
+LOBJFLAG = -o\ # whitespace intended
 
 # Among the variables below, these:
 #   gitexecdir
@@ -874,6 +878,58 @@ ifneq (,$(findstring CYGWIN,$(uname_S)))
 	COMPAT_OBJS += compat/cygwin.o
 	UNRELIABLE_FSTAT = UnfortunatelyYes
 endif
+ifneq (,$(findstring Microsoft Visual Studio, $(INCLUDE)))
+	pathsep = ;
+	MOZILLA_SHA1 = 1
+	NO_PREAD = YesPlease
+	NO_OPENSSL = YesPlease
+	NO_LIBGEN_H = YesPlease
+	NO_SYMLINK_HEAD = YesPlease
+	NO_IPV6 = YesPlease
+	NO_SETENV = YesPlease
+	NO_UNSETENV = YesPlease
+	NO_STRCASESTR = YesPlease
+	NO_STRLCPY = YesPlease
+	NO_MEMMEM = YesPlease
+	NEEDS_LIBICONV = YesPlease
+	OLD_ICONV = YesPlease
+	NO_C99_FORMAT = YesPlease
+	NO_STRTOUMAX = YesPlease
+	NO_MKDTEMP = YesPlease
+	NO_MKSTEMPS = YesPlease
+	SNPRINTF_RETURNS_BOGUS = YesPlease
+	NO_SVN_TESTS = YesPlease
+	NO_PERL_MAKEMAKER = YesPlease
+	RUNTIME_PREFIX = YesPlease
+	NO_POSIX_ONLY_PROGRAMS = YesPlease
+	NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
+	NO_NSEC = YesPlease
+	USE_WIN32_MMAP = YesPlease
+	UNRELIABLE_FSTAT = UnfortunatelyYes
+	OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo
+	NO_REGEX = YesPlease
+
+	NO_CURL = YesPlease
+	NO_PTHREADS = YesPlease
+        
+	CC = cl 
+	COBJFLAG = -Fo
+	LOBJFLAG = -OUT:
+	CFLAGS =
+	BASIC_CFLAGS += -nologo -MT -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32 -D_CONSOLE
+	COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch -Icompat/regex -Icompat/fnmatch
+	COMPAT_OBJS += compat/mingw.o compat/msvc.o compat/fnmatch/fnmatch.o compat/winansi.o
+	COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
+
+	LINK = link
+	BASIC_LDFLAGS += -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib ../zlib/projects/vc9/Win32_LIB_Release/zlib.lib
+	NO_CFLAGS_TO_LINKER = YesPlease
+	EXTLIBS = 
+	AR = lib
+	ARFLAGS = -OUT:
+
+	X = .exe
+else
 ifneq (,$(findstring MINGW,$(uname_S)))
 	pathsep = ;
 	NO_PREAD = YesPlease
@@ -922,6 +978,7 @@ else
 	NO_PTHREADS = YesPlease
 endif
 endif
+endif
 ifneq (,$(findstring arm,$(uname_M)))
 	ARM_SHA1 = YesPlease
 	NO_MKSTEMPS = YesPlease
@@ -1298,6 +1355,14 @@ LIB_OBJS += $(COMPAT_OBJS)
 ALL_CFLAGS += $(BASIC_CFLAGS)
 ALL_LDFLAGS += $(BASIC_LDFLAGS)
 
+ifndef LINK
+LINK = $(CC)
+endif
+
+ifndef NO_CFLAGS_TO_LINKER
+LINKER_CFLAGS += $(ALL_CFLAGS)
+endif
+
 export TAR INSTALL DESTDIR SHELL_PATH
 
 
@@ -1331,14 +1396,14 @@ strip: $(PROGRAMS) git$X
 git.o: git.c common-cmds.h GIT-CFLAGS
 	$(QUIET_CC)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
 		'-DGIT_HTML_PATH="$(htmldir_SQ)"' \
-		$(ALL_CFLAGS) -c $(filter %.c,$^)
+		$(ALL_CFLAGS) $(COMPFLAG) $(COBJFLAG)git.o $(filter %.c,$^)
 
 git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
-	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
+	$(QUIET_LINK)$(LINK) $(LINKER_CFLAGS) $(LOBJFLAG)$@ git.o \
 		$(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
 
 builtin-help.o: builtin-help.c common-cmds.h GIT-CFLAGS
-	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) \
+	$(QUIET_CC)$(CC) $(COBJFLAG)$*.o $(COMPFLAG) $(ALL_CFLAGS) \
 		'-DGIT_HTML_PATH="$(htmldir_SQ)"' \
 		'-DGIT_MAN_PATH="$(mandir_SQ)"' \
 		'-DGIT_INFO_PATH="$(infodir_SQ)"' $<
@@ -1450,44 +1515,44 @@ git.o git.spec \
 	: GIT-VERSION-FILE
 
 %.o: %.c GIT-CFLAGS
-	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
+	$(QUIET_CC)$(CC) $(COBJFLAG)$*.o $(COMPFLAG) $(ALL_CFLAGS) $<
 %.s: %.c GIT-CFLAGS
 	$(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $<
 %.o: %.S
-	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
+	$(QUIET_CC)$(CC) $(COBJFLAG)$*.o $(COMPFLAG) $(ALL_CFLAGS) $<
 
 exec_cmd.o: exec_cmd.c GIT-CFLAGS
-	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) \
+	$(QUIET_CC)$(CC) $(COBJFLAG)$*.o $(COMPFLAG) $(ALL_CFLAGS) \
 		'-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \
 		'-DBINDIR="$(bindir_relative_SQ)"' \
 		'-DPREFIX="$(prefix_SQ)"' \
 		$<
 
 builtin-init-db.o: builtin-init-db.c GIT-CFLAGS
-	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"' $<
+	$(QUIET_CC)$(CC) $(COBJFLAG)$*.o $(COMPFLAG) $(ALL_CFLAGS) -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"' $<
 
 config.o: config.c GIT-CFLAGS
-	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"' $<
+	$(QUIET_CC)$(CC) $(COBJFLAG)$*.o $(COMPFLAG) $(ALL_CFLAGS) -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"' $<
 
 http.o: http.c GIT-CFLAGS
-	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DGIT_USER_AGENT='"git/$(GIT_VERSION)"' $<
+	$(QUIET_CC)$(CC) $(COBJFLAG)$*.o $(COMPFLAG) $(ALL_CFLAGS) -DGIT_USER_AGENT='"git/$(GIT_VERSION)"' $<
 
 ifdef NO_EXPAT
 http-walker.o: http-walker.c http.h GIT-CFLAGS
-	$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DNO_EXPAT $<
+	$(QUIET_CC)$(CC) $(COBJFLAG)$*.o $(COMPFLAG) $(ALL_CFLAGS) -DNO_EXPAT $<
 endif
 
 git-%$X: %.o $(GITLIBS)
-	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
+	$(QUIET_LINK)$(LINK) $(LINKER_CFLAGS) $(LOBJFLAG)$@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
 
 git-imap-send$X: imap-send.o $(GITLIBS)
-	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
+	$(QUIET_LINK)$(LINK) $(LINKER_CFLAGS) $(LOBJFLAG)$@ $(ALL_LDFLAGS) $(filter %.o,$^) \
 		$(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL)
 
 http.o http-walker.o http-push.o transport.o: http.h
 
 git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
-	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
+	$(QUIET_LINK)$(LINK) $(LINKER_CFLAGS) $(LOBJFLAG)$@ $(ALL_LDFLAGS) $(filter %.o,$^) \
 		$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
 
 $(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
@@ -1495,7 +1560,7 @@ $(patsubst git-%$X,%.o,$(PROGRAMS)) git.o: $(LIB_H) $(wildcard */*.h)
 builtin-revert.o wt-status.o: wt-status.h
 
 $(LIB_FILE): $(LIB_OBJS)
-	$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS)
+	$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS)$@ $(LIB_OBJS)
 
 XDIFF_OBJS=xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o \
 	xdiff/xmerge.o xdiff/xpatience.o
@@ -1503,7 +1568,7 @@ $(XDIFF_OBJS): xdiff/xinclude.h xdiff/xmacros.h xdiff/xdiff.h xdiff/xtypes.h \
 	xdiff/xutils.h xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
 
 $(XDIFF_LIB): $(XDIFF_OBJS)
-	$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(XDIFF_OBJS)
+	$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS)$@ $(XDIFF_OBJS)
 
 
 doc:
@@ -1605,7 +1670,7 @@ test-parse-options.o: parse-options.h
 .PRECIOUS: $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS))
 
 test-%$X: test-%.o $(GITLIBS)
-	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
+	$(QUIET_LINK)$(LINK) $(LINKER_CFLAGS) $(LOBJFLAG)$@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
 
 check-sha1:: test-sha1$X
 	./test-sha1.sh
compat/msvc.h +77 -0

136 lines not on this page · raw message

Signature · 1 line
1.6
#31 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Quoted 11 lines · Marius Storm-Olsen
(quoted diff) +0 -0
@@ -1331,14 +1396,14 @@ strip: $(PROGRAMS) git$X

 git.o: git.c common-cmds.h GIT-CFLAGS
       $(QUIET_CC)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
               '-DGIT_HTML_PATH="$(htmldir_SQ)"' \
-               $(ALL_CFLAGS) -c $(filter %.c,$^)
+               $(ALL_CFLAGS) $(COMPFLAG) $(COBJFLAG)git.o $(filter %.c,$^)

 git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
-       $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
+       $(QUIET_LINK)$(LINK) $(LINKER_CFLAGS) $(LOBJFLAG)$@ git.o \
               $(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)

<snip>

Quoted 5 lines

 ifdef NO_EXPAT
 http-walker.o: http-walker.c http.h GIT-CFLAGS
-       $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) -DNO_EXPAT $<
+       $(QUIET_CC)$(CC) $(COBJFLAG)$*.o $(COMPFLAG) $(ALL_CFLAGS) -DNO_EXPAT $< endif

Perhaps this is the right time to change the make-system to using the somewhat standard $(COMPLIE.c), $(OUTPUT_OPTION) etc macros?

Signature · 3 lines
Erik "kusma" Faye-Lund
[email protected]
(+47) 986 59 656
#32 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

In reply to Marius Storm-Olsen

Marius Storm-Olsen said the following on 18.08.2009 14:58:

Quoted 3 lines

This is a rudementary patch, only meant as an RFC for now!!

!! DO NOT COMMIT THIS UPSTREAM !!

..meaning in this case Frank Li's repo, and obviously not git.git. :p

--
.marius

#33 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

In reply to Marius Storm-Olsen

Marius Storm-Olsen schreef:

Quoted 5 lines

From: Marius Storm-Olsen <[email protected]>

By using GNU Make we can also compile with the MSVC toolchain. This is a rudementary patch, only meant as an RFC for now!!

Would this mean that only the MSVC toolchain is used to build git in batch? Or does GNU Make create a .vcproj file like CMake? Because that ofcource is the whole purpose of using CMake. One can use the Visual Studio IDE to hack on git.

#34 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Quoted 10 lines · Johan 't Hart

Marius Storm-Olsen schreef:

Quoted 6 lines

From: Marius Storm-Olsen <[email protected]>

By using GNU Make we can also compile with the MSVC toolchain. This is a rudementary patch, only meant as an RFC for now!!

Would this mean that only the MSVC toolchain is used to build git in batch? Or does GNU Make create a .vcproj file like CMake?

That patch uses GNU Make but invoking the MSVC compiler, linker, etc instead of the GNU compiler, linker, etc. It'd be the same if you wanted to use the Intel compiler, the Sun compiler, etc.

Quoted 3 lines

Because that ofcource is
the whole purpose of using CMake. One can use the Visual Studio IDE to hack on git.

CMake is also useful to create installers/tarballs (see CPack), run tests (see CTest; it's NOT a unit test library but a tests launcher on steroids) and submit the results of compilation, tests and installation to a dashboard where you can easily see what (if anything) went wrong (see CDash, formerly Dart).

Signature · 3 lines
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
#35 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Quoted 6 lines

CMake is also useful to create installers/tarballs (see CPack), run tests (see CTest; it's NOT a unit test library but a tests launcher on steroids) and submit the results of compilation, tests and installation to a dashboard where you can easily see what (if anything) went wrong (see CDash, formerly Dart).

If I know the git hackers, CMake will _never_ be used except _possibly_ for generating a .vcproj file.

Paolo

#36 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

In reply to Johan 't Hart

2009/8/18 Johan 't Hart <[email protected]>:

Quoted 4 lines

Marius Storm-Olsen schreef:

Quoted 3 lines

From: Marius Storm-Olsen <[email protected]>

Quoted 8 lines
Quoted 3 lines

By using GNU Make we can also compile with the MSVC toolchain. This is a rudementary patch, only meant as an RFC for now!!

Would this mean that only the MSVC toolchain is used to build git in batch? Or does GNU Make create a .vcproj file like CMake? Because that ofcource is the whole purpose of using CMake. One can use the Visual Studio IDE to hack on git.

... unless you add a file to the vcproj, or change the project
settings: you'll need to update the CMake file and the Make file (for the POSIX builds), otherwise you're going to break things.

- Reece

#37 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

In reply to Marius Storm-Olsen

Marius Storm-Olsen <[email protected]> writes:

Quoted 4 lines · Marius Storm-Olsen
(quoted diff) +4 -0
+ARFLAGS = rcs\ # whitespace intentional
+COMPFLAG = -c
+COBJFLAG = -o\ # whitespace intended
+LOBJFLAG = -o\ # whitespace intended

Review

Quoted 10 lines
(quoted diff) +6 -1
...
+ifneq (,$(findstring Microsoft Visual Studio, $(INCLUDE)))
+	CC = cl 
+	COBJFLAG = -Fo
+	LOBJFLAG = -OUT:
+	CFLAGS =
 git.o: git.c common-cmds.h GIT-CFLAGS
...
-		$(ALL_CFLAGS) -c $(filter %.c,$^)
+		$(ALL_CFLAGS) $(COMPFLAG) $(COBJFLAG)git.o $(filter %.c,$^)

Since use of make implies use of shell, this makes me wonder if it would make sense to go one step further by giving msvc users a thin shell wrapper mcvc-cc that turns bog-standard cc command line into whatever cl uses.

#38 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Junio C Hamano said the following on 18.08.2009 18:51:

Quoted 15 lines

Marius Storm-Olsen <[email protected]> writes:

Quoted 11 lines · Marius Storm-Olsen
(quoted diff) +9 -0
+ARFLAGS = rcs\ # whitespace intentional
+COMPFLAG = -c
+COBJFLAG = -o\ # whitespace intended
+LOBJFLAG = -o\ # whitespace intended
...
+ifneq (,$(findstring Microsoft Visual Studio, $(INCLUDE)))
+	CC = cl 
+	COBJFLAG = -Fo
+	LOBJFLAG = -OUT:
+	CFLAGS =
 git.o: git.c common-cmds.h GIT-CFLAGS
Quoted 8 lines

Makefile strip: $(PROGRAMS) git$X · line 1399

Quoted 3 lines

...

Makefile +1 -1
-		$(ALL_CFLAGS) -c $(filter %.c,$^)
+		$(ALL_CFLAGS) $(COMPFLAG) $(COBJFLAG)git.o $(filter %.c,$^)

Since use of make implies use of shell, this makes me wonder if it would make sense to go one step further by giving msvc users a thin shell wrapper mcvc-cc that turns bog-standard cc command line into whatever cl uses.

That, of course, is also a feasible option :)
However, there are still things you wouldn't want to pass on to this script, for example, we don't pass on all the CFLAGS to the linker on Windows.

The "whitespace intended" in the patch are quite nasty though..

--
.marius

#39 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

In reply to Junio C Hamano

Junio C Hamano schreef:

Quoted 4 lines

Since use of make implies use of shell, this makes me wonder if it would make sense to go one step further by giving msvc users a thin shell wrapper mcvc-cc that turns bog-standard cc command line into whatever cl uses.

Just using the msvc toolchain for building git misses the whole purpose of what VC is used for. MSVC would be used because of the IDE, not for the compiler IMO. msysgit already has a nice toolchain, using gcc, to build git. I think there is no reason to use MSVC for that purpose.

The purpose of CMake was to build an .vcproj file to be used by the IDE, not for a batch process that builds git with the VC toolchain. Users could than hack git with the IDE from MSVC. And ofcource git should then also be compilable by MSVC's cl.exe, because the IDE is not capable of using another toolchain then its own...

#40 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Johan 't Hart said the following on 18.08.2009 19:41:

Quoted 9 lines

Junio C Hamano schreef:

Quoted 4 lines

Since use of make implies use of shell, this makes me wonder if it would make sense to go one step further by giving msvc users a thin shell wrapper mcvc-cc that turns bog-standard cc command line into whatever cl uses.

Just using the msvc toolchain for building git misses the whole purpose of what VC is used for. MSVC would be used because of the IDE, not for the compiler IMO.

Bull. MSVC produces superior code on Windows compared to MinGW, I'm afraid. Add the /LTGC (Link Time Code Generation), and MSVC generates very good cross compile-unit optimized code. (I know gcc has the option, but it's not as good, by far) Coupled now with built-in static code analysis, these are only two reasons why *I* would want to build it directly from the command line without worrying that my .vcproj is out-of-sync with the main development. You can still debug with the MSVC debugger if you'd like, and the MSVC IDE allows you to wrap Makefile project too, so you can *still* use the IDE..

--
.marius

#41 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Hi,

Quoted 11 lines · Marius Storm-Olsen

Johan 't Hart said the following on 18.08.2009 19:41:

Quoted 9 lines

Junio C Hamano schreef:

Quoted 4 lines

Since use of make implies use of shell, this makes me wonder if it would make sense to go one step further by giving msvc users a thin shell wrapper mcvc-cc that turns bog-standard cc command line into whatever cl uses.

Just using the msvc toolchain for building git misses the whole purpose of what VC is used for. MSVC would be used because of the IDE, not for the compiler IMO.

Quoted 9 lines

Bull. MSVC produces superior code on Windows compared to MinGW, I'm afraid. Add the /LTGC (Link Time Code Generation), and MSVC generates very good cross compile-unit optimized code. (I know gcc has the option, but it's not as good, by far)
Coupled now with built-in static code analysis, these are only two reasons why *I* would want to build it directly from the command line without worrying that my .vcproj is out-of-sync with the main development.
You can still debug with the MSVC debugger if you'd like, and the MSVC IDE allows you to wrap Makefile project too, so you can *still* use the IDE..

Well, "you can *still* use the IDE" is a bit exaggerated, no? At least unless you misunderstand "IDE" to mean "Integrated Debugging environment".

You'll lose not only the ability to follow definitions/declarations in the code, you'll also lose the ability to compile incrementally _while_ debuggin, and Visual Studio's feature to move to the next/previous compile error.

Ciao,
Dscho

#42 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Quoted 2 lines · Johannes Schindelin

debuggin, and Visual Studio's feature to move to the next/previous compile error.

Nope, you're still able to skip through the erros (with F4) as ususal. I've been using a sed-script to translate gcc-style errors to msvc-style errors for makefile projects before with great success. In this case, the errors are already in msvc-style, so that part should really not be any issue.

Signature · 3 lines
Erik "kusma" Faye-Lund
[email protected]
(+47) 986 59 656
#43 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Hi,

Quoted 10 lines · Erik Faye-Lund
Quoted 2 lines · Johannes Schindelin

debuggin, and Visual Studio's feature to move to the next/previous compile error.

Nope, you're still able to skip through the erros (with F4) as ususal. I've been using a sed-script to translate gcc-style errors to msvc-style errors for makefile projects before with great success. In this case, the errors are already in msvc-style, so that part should really not be any issue.

At this point you are just piling work-around on work-around.

Ciao,
Dscho

#44 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Quoted 7 lines · Johannes Schindelin
Quoted 5 lines

Nope, you're still able to skip through the erros (with F4) as ususal. I've been using a sed-script to translate gcc-style errors to msvc-style errors for makefile projects before with great success. In this case, the errors are already in msvc-style, so that part should really not be any issue.

At this point you are just piling work-around on work-around.

At what point? This works out of the box for makefile projects that use msvc for compilation. Sure, for my gcc-setup, yeah. But how is that being a stack of work-arounds relevant in this context?

I'm not arguing either way here - I'm perfectly happy to stick with MinGW.

I'm just saying that one of the problems you pointed out is not really a problem. The rest of them sounds like very much like real problems to me - not particularly big issues, you're the one who just said that perfect is the enemy of the good, no? ;)

Signature · 3 lines
Erik "kusma" Faye-Lund
[email protected]
(+47) 986 59 656
#45 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Hi,

Quoted 11 lines · Erik Faye-Lund
Quoted 7 lines · Johannes Schindelin
Quoted 5 lines

Nope, you're still able to skip through the erros (with F4) as ususal. I've been using a sed-script to translate gcc-style errors to msvc-style errors for makefile projects before with great success. In this case, the errors are already in msvc-style, so that part should really not be any issue.

At this point you are just piling work-around on work-around.

At what point?

At the point where you bolt on a sed script on top of a bolted-on build procedure.

Using a Makefile from within Visual Studio is just not the intended way to do things, so you will hit the limitations sooner or later.

For example when the sed script encounters a situation which was not anticipated by the script author.

So I think if we support Microsoft Visual C++, it should be either through .vcproj files, or through a procedure that creates them.

Ciao,
Dscho

#46 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Johannes Schindelin said the following on 19.08.2009 09:16:

Quoted 14 lines · Erik Faye-Lund
Quoted 9 lines · Johannes Schindelin
Quoted 7 lines
Quoted 6 lines

Nope, you're still able to skip through the erros (with F4) as ususal. I've been using a sed-script to translate gcc-style errors to msvc-style errors for makefile projects before with great success. In this case, the errors are already in msvc-style, so that part should really not be any issue.

At this point you are just piling work-around on work-around.

At what point?

At the point where you bolt on a sed script on top of a bolted-on build procedure.

Quoted 8 lines

Using a Makefile from within Visual Studio is just not the intended way to do things, so you will hit the limitations sooner or later.

For example when the sed script encounters a situation which was not anticipated by the script author.

So I think if we support Microsoft Visual C++, it should be either through .vcproj files, or through a procedure that creates them.

IMO, and I'm primarily a Windows developer mind you and spend a lot of time in Visual Studio, the primary is to support *compiling* git with VC, which is easily done with a few changes to the current Makefile.

The full IDE support is secondary, first because you *can* use the IDE already, and second because it'll be harder to whip something up which guarantees that the vcproj support stays in-sync at all times and won't lag behind.

If you want, you can even use Qt Creator's Makefile support on any platform to build and debug git, and get tab completion, code refactoring support, 'quick open' navigation etc. So, I still think the primary focus should be to simply add the VC support in the current setup, and ensure that the patch series is up to scratch; and when that's all done, *then* add the effort of properly supporting the various IDEs.

Of course, if someone has a huge itch to restructure the current Makefile; factoring out the files into a file which can simply be included in the current Makefile, and easily parsed by a script, or included by CMake, then that can be done in parallel and possible added to git mainline before the MSVC support patches from Frank.

--
.marius

#47 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Hi,

Quoted 4 lines · Marius Storm-Olsen

The full IDE support is secondary, first because you *can* use the IDE already, and second because it'll be harder to whip something up which guarantees that the vcproj support stays in-sync at all times and won't lag behind.

I think the point of Frank's patches is to make Visual Studio users comfortable with Git. You cannot ask those to use a build process or an IDE they are not used to.

Quoted 5 lines

Of course, if someone has a huge itch to restructure the current Makefile; factoring out the files into a file which can simply be included in the current Makefile, and easily parsed by a script, or included by CMake, then that can be done in parallel and possible added to git mainline before the MSVC support patches from Frank.

I still think it would be possible to use a combination of a Makefile rule and GNU make features to spit out a list of targets and their dependet .h and .c files.

Ciao,
Dscho

#48 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Hi,

Quoted 4 lines · Johannes Schindelin

Hi,

On Wed, 19 Aug 2009, Marius Storm-Olsen wrote:

Quoted 9 lines
Quoted 4 lines

The full IDE support is secondary, first because you *can* use the IDE already, and second because it'll be harder to whip something up which guarantees that the vcproj support stays in-sync at all times and won't lag behind.

I think the point of Frank's patches is to make Visual Studio users comfortable with Git.  You cannot ask those to use a build process or an IDE they are not used to.

I don't know Frank's intentions behind adding the .vcproj files. Maybe it was just easier for him to create them, rather than hacking the Makefile?

As a Windows / Visual Studio user, I have to agree with Marius' points here. Most importantly, get the git code itself to compile with Visual Studio. Did anyone do any benchmarking yet? I wouldn't be surprised if we got some speed improvements from this. Also, it will no longer impossible to use the Visual Studio debugger.

Supporting the Visual Studio compiler in the Makefile seems like an excellent and maintainable way of getting the build up and running.

I can't speek for all Visual Studio users, of course, but personally I couldn't care less about the .vcproj files. I use other IDE's for developing on Windows (qt-creator, eclipse-cdt), so for me .vcproj files would be useless. The Makefile should work from any IDE. In my experience, all of qt-creator, eclipse _and_ Visual Studio support running any make-like program, and parse the compiler errors correctly without using sed or other kinds of magic.

Quoted 4 lines

I still think it would be possible to use a combination of a Makefile rule and GNU make features to spit out a list of targets and their dependet .h and .c files.

I wouldn't mind if someone was willing to add and maintain this, of course, but at least for me it wouldn't be particularely useful.

Cheers,
Thomas Berg

#54 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

In reply to Marius Storm-Olsen

Hi,

Quoted 5 lines · Marius Storm-Olsen

So, instead of rely on these vcproj files which *will* go stale, we can simply use the same Makefile system which everyone else is using. :) After all, we're just compiling with a different compiler. The end result will still rely on the *msysGit environment* to function, so we already require it. Thus, GNU Make is present, and we can use it.

We can also use sed or perl to generate/modify the .vcproj files, or run CMake (once Pau got it to build), and package the stuff using zip (once I got that to build).

Quoted 5 lines
Makefile +0 -0
index daf4296..2e14976 100644

Makefile uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') · line 223

Quoted 10 lines
Makefile +4 -0
@@ -214,9 +214,13 @@ uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
 
 CFLAGS = -g -O2 -Wall
 LDFLAGS =
+ARFLAGS = rcs\ # whitespace intentional
 ALL_CFLAGS = $(CFLAGS)
 ALL_LDFLAGS = $(LDFLAGS)
 STRIP ?= strip
+COMPFLAG = -c
+COBJFLAG = -o\ # whitespace intended
+LOBJFLAG = -o\ # whitespace intended

These probably want to go into the Microsoft Visual C++ specific section.

Quoted 49 lines
Makefile +45 -0
@@ -874,6 +878,58 @@ ifneq (,$(findstring CYGWIN,$(uname_S)))
 	COMPAT_OBJS += compat/cygwin.o
 	UNRELIABLE_FSTAT = UnfortunatelyYes
 endif
+ifneq (,$(findstring Microsoft Visual Studio, $(INCLUDE)))
+	pathsep = ;
+	MOZILLA_SHA1 = 1
+	NO_PREAD = YesPlease
+	NO_OPENSSL = YesPlease
+	NO_LIBGEN_H = YesPlease
+	NO_SYMLINK_HEAD = YesPlease
+	NO_IPV6 = YesPlease
+	NO_SETENV = YesPlease
+	NO_UNSETENV = YesPlease
+	NO_STRCASESTR = YesPlease
+	NO_STRLCPY = YesPlease
+	NO_MEMMEM = YesPlease
+	NEEDS_LIBICONV = YesPlease
+	OLD_ICONV = YesPlease
+	NO_C99_FORMAT = YesPlease
+	NO_STRTOUMAX = YesPlease
+	NO_MKDTEMP = YesPlease
+	NO_MKSTEMPS = YesPlease
+	SNPRINTF_RETURNS_BOGUS = YesPlease
+	NO_SVN_TESTS = YesPlease
+	NO_PERL_MAKEMAKER = YesPlease
+	RUNTIME_PREFIX = YesPlease
+	NO_POSIX_ONLY_PROGRAMS = YesPlease
+	NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
+	NO_NSEC = YesPlease
+	USE_WIN32_MMAP = YesPlease
+	UNRELIABLE_FSTAT = UnfortunatelyYes
+	OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo
+	NO_REGEX = YesPlease
+
+	NO_CURL = YesPlease
+	NO_PTHREADS = YesPlease
+        
+	CC = cl 
+	COBJFLAG = -Fo
+	LOBJFLAG = -OUT:
+	CFLAGS =
+	BASIC_CFLAGS += -nologo -MT -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32 -D_CONSOLE
+	COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch -Icompat/regex -Icompat/fnmatch
+	COMPAT_OBJS += compat/mingw.o compat/msvc.o compat/fnmatch/fnmatch.o compat/winansi.o
+	COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
+
+	LINK = link
+	BASIC_LDFLAGS += -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib ../zlib/projects/vc9/Win32_LIB_Release/zlib.lib

Makefile ifneq (,$(findstring CYGWIN,$(uname_S))) · line 935

Quoted 10 lines
Makefile +7 -0
+	NO_CFLAGS_TO_LINKER = YesPlease
+	EXTLIBS = 
+	AR = lib
+	ARFLAGS = -OUT:
+
+	X = .exe
+else
 ifneq (,$(findstring MINGW,$(uname_S)))
 	pathsep = ;
 	NO_PREAD = YesPlease

This means that gcc is never used when Visual C++ is available? Hmm.

compat/msvc.h line 15

Quoted 11 lines
compat/msvc.h +2 -0
index 6071565..a9d5f7f 100644
@@ -10,50 +10,120 @@
 
 /*Configuration*/
 
+#ifndef NO_PREAD
 #define NO_PREAD
+#endif

Why? You now have the stuff in two places. If you want to keep them in compat/msvc.h to be able to generate .vcproj files, I'd rather not have them duplicated in the Makefile.

Ciao,
Dscho

#55 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Quoted 10 lines · Johannes Schindelin

Hi,

Quoted 5 lines · Marius Storm-Olsen

 So, instead of rely on these vcproj files which *will* go stale, we can simply use the same Makefile system which everyone else is using. :) After all, we're just compiling with a different compiler. The end result will still rely on the *msysGit environment* to function, so we already require it. Thus, GNU Make is present, and we can use it.

Quoted 3 lines

We can also use sed or perl to generate/modify the .vcproj files, or run CMake (once Pau got it to build), and package the stuff using zip (once I got that to build).

Re: package the stuff using ZIP, it's trivial to do with CPack (part of the CMake chain). Just tell me what you want to get and I'll implement it.

Signature · 3 lines
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
#56 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Hi,

Quoted 12 lines · Pau Garcia i Quiles
Quoted 9 lines · Johannes Schindelin
Quoted 6 lines · Marius Storm-Olsen

 So, instead of rely on these vcproj files which *will* go stale, we can  simply use the same Makefile system which everyone else is using. :)  After all, we're just compiling with a different compiler. The end  result will still rely on the *msysGit environment* to function, so we  already require it. Thus, GNU Make is present, and we can use it.

Quoted 7 lines
Quoted 3 lines

We can also use sed or perl to generate/modify the .vcproj files, or run CMake (once Pau got it to build), and package the stuff using zip (once I got that to build).

Re: package the stuff using ZIP, it's trivial to do with CPack (part of the CMake chain). Just tell me what you want to get and I'll implement it.

Well, I tried to tell you already what I want. A simple and unsupervised script that downloads, compiles, installs and commits CMake.

Ciao,
Dscho

#57 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

In reply to Johannes Schindelin

Johannes Schindelin said the following on 18.08.2009 16:11:

Quoted 11 lines · Marius Storm-Olsen
Quoted 6 lines

So, instead of rely on these vcproj files which *will* go stale, we can simply use the same Makefile system which everyone else is using. :) After all, we're just compiling with a different compiler. The end result will still rely on the *msysGit environment* to function, so we already require it. Thus, GNU Make is present, and we can use it.

We can also use sed or perl to generate/modify the .vcproj files, or run CMake (once Pau got it to build), and package the stuff using zip (once I got that to build).

Really? That would be some script being able to parse the Makefile, and create something reasonable as a vcproj script :) Keeping all the options in sync, conditional files/libs, all the various end executables (a separate .vcproj for each of them, and a solution file (.sln)to tie them all together into a .. "solution", a complete product blah blah blah) etc.

Just using the (GNU) Makefile as the 'default' way of compiling with MSVC seems to be the most reasonable to me. Then we could just have a contrib/vc/msvc2008.vcproj which someone can update when they feel like it. The default way should be hard to get out-of-sync, IMO.

Quoted 2 lines
Quoted 2 lines
Makefile +1 -0
+ifneq (,$(findstring Microsoft Visual Studio, $(INCLUDE)))

...

Quoted 6 lines

Makefile ifneq (,$(findstring CYGWIN,$(uname_S))) · line 935

Quoted 4 lines
Makefile +1 -0
+else
 ifneq (,$(findstring MINGW,$(uname_S)))
 	pathsep = ;
 	NO_PREAD = YesPlease

This means that gcc is never used when Visual C++ is available? Hmm.

Yes it does :)
First, "This implementation is a quick hack to make it compile", so it was all about just making it compile, not being 100% correct. There are still some warnings and options which shouldn't be passed on to cl, so it's by no means complete. Second, having MSVC include paths in INCLUDE when you're compiling with MinGW would be plain wrong. I could use LIB instead, which would be even wronger ;) I was actually going to replace it with a USE_MSVC variable check instead though, so you'd rather do 'make USE_MSVC=1'

Quoted 6 lines
Quoted 6 lines
compat/msvc.h +0 -0
index 6071565..a9d5f7f 100644
@@ -10,50 +10,120 @@
 
Quoted 7 lines

compat/msvc.h line 15

Quoted 5 lines
compat/msvc.h +2 -0
 /*Configuration*/
 
+#ifndef NO_PREAD
 #define NO_PREAD
+#endif

Why? You now have the stuff in two places. If you want to keep them in compat/msvc.h to be able to generate .vcproj files, I'd rather not have them duplicated in the Makefile.

The changes to the msvc.h where added just keep Frank's vcproj project working. I would have just nuked all that stuff in the msvc.h since the Makefile would just provide it for me anyways..

--
.marius

#58 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Quoted 13 lines · Marius Storm-Olsen

Johannes Schindelin said the following on 18.08.2009 16:11:

Quoted 11 lines · Marius Storm-Olsen
Quoted 6 lines

So, instead of rely on these vcproj files which *will* go stale, we can simply use the same Makefile system which everyone else is using. :) After all, we're just compiling with a different compiler. The end result will still rely on the *msysGit environment* to function, so we already require it. Thus, GNU Make is present, and we can use it.

We can also use sed or perl to generate/modify the .vcproj files, or run CMake (once Pau got it to build), and package the stuff using zip (once I got that to build).

Quoted 5 lines

Really? That would be some script being able to parse the Makefile, and create something reasonable as a vcproj script :) Keeping all the options in sync, conditional files/libs, all the various end executables (a separate .vcproj for each of them, and a solution file (.sln)to tie them all together into a .. "solution", a complete product blah blah blah) etc.

I think it wouldn't be impossible to split the Makefile into an easy-to-parse part and an irrelevant-to-vcproj part. Certainly you don't need GNU Make to read a file:

SCRIPT_SH += git-am.sh
SCRIPT_SH += git-bisect.sh

SCRIPT_PERL += git-add--interactive.perl

PROGRAM_NAMES += git-fast-import

BUILTINS_IN_OBJS += add

(etc)

That is, we can probably describe the project sufficiently with a lot of

VAR += value

lines, using only constant values and variables we specify, and then the Makefile declares them empty and does an

include UserServicableParts

and puts together the variables it needs. And things that aren't GNU Make could also process this file without enormous difficulty, since it's essentially a .ini file or java resource file with a stray + on each line. Of course, people interested in the vcproj thing would have to update whatever makes VC do the right thing when new *rules* are introduced, but that's a lot less common than new *files* being introduced, and also more obvious (in the sense that the included file is setting variables that the builder doesn't know what to do with).

-Daniel
*This .sig left intentionally blank*

#59 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Hi,

Quoted 22 lines · Daniel Barkalow
Quoted 13 lines · Marius Storm-Olsen

Johannes Schindelin said the following on 18.08.2009 16:11:

Quoted 11 lines · Marius Storm-Olsen
Quoted 6 lines

So, instead of rely on these vcproj files which *will* go stale, we can simply use the same Makefile system which everyone else is using. :) After all, we're just compiling with a different compiler. The end result will still rely on the *msysGit environment* to function, so we already require it. Thus, GNU Make is present, and we can use it.

We can also use sed or perl to generate/modify the .vcproj files, or run CMake (once Pau got it to build), and package the stuff using zip (once I got that to build).

Quoted 6 lines

Really? That would be some script being able to parse the Makefile, and create something reasonable as a vcproj script :) Keeping all the options in sync, conditional files/libs, all the various end executables (a separate .vcproj for each of them, and a solution file (.sln)to tie them all together into a .. "solution", a complete product blah blah blah) etc.

Quoted 2 lines

I think it wouldn't be impossible to split the Makefile into an easy-to-parse part and an irrelevant-to-vcproj part.

What? That is pretty fragile.

It would be _much_ better to just add another Makefile target that outputs the files needed for the targets.

We do not need to keep the Makefile as-is! If the change is not intrusive, I am sure our friendly maintainer will not see a problem either.

No need for fragile parsing at all.

Ciao,
Dscho

#61 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

In reply to Marius Storm-Olsen
Quoted 29 lines · Marius Storm-Olsen

From: Marius Storm-Olsen <[email protected]>

By using GNU Make we can also compile with the MSVC toolchain. This is a rudementary patch, only meant as an RFC for now!!

!! DO NOT COMMIT THIS UPSTREAM !!
---
So, instead of rely on these vcproj files which *will* go stale, we can simply use the same Makefile system which everyone else is using. :) After all, we're just compiling with a different compiler. The end result will still rely on the *msysGit environment* to function, so we already require it. Thus, GNU Make is present, and we can use it.

This implementation is a quick hack to make it compile (hence the RFC subject), so please don't even consider basing anything ontop of it ;)

But, do point out all the do's and don'ts, and I'll try to polish it up to something which we can add to Frank's series..

 Makefile      |   97 +++++++++++++++++++++++++++++++++++++++++++++++---------
 compat/msvc.h |   77 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 158 insertions(+), 16 deletions(-)
Makefile +0 -0
index daf4296..2e14976 100644

Makefile uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') · line 223

Quoted 10 lines
Makefile +4 -0
@@ -214,9 +214,13 @@ uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
 
 CFLAGS = -g -O2 -Wall
 LDFLAGS =
+ARFLAGS = rcs\ # whitespace intentional
 ALL_CFLAGS = $(CFLAGS)
 ALL_LDFLAGS = $(LDFLAGS)
 STRIP ?= strip
+COMPFLAG = -c
+COBJFLAG = -o\ # whitespace intended
+LOBJFLAG = -o\ # whitespace intended

I think it's nicer to write the significant whitespace with non-whitespace text using something like:

empty=
space=$(empty) $(empty)

(...)

ARFLAGS = rcs$(space)

COBJFLAG = -o$(space)

On the other hand, I think it would be clearer to put the "rcs" in the default version of $(AR), and have a $(AROBJFLAG) set to nothing there, since the "rcs" isn't actually at all like the "-OUT:" with respect to what it's doing there.

Possibly also to have two variables for the output of the toolchain wrapper, one that is before the name of the file and one that's attached to the name of the file.

-Daniel
*This .sig left intentionally blank*

#62 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Daniel Barkalow said the following on 18.08.2009 18:51:

Quoted 49 lines · Marius Storm-Olsen
Quoted 30 lines

From: Marius Storm-Olsen <[email protected]>

By using GNU Make we can also compile with the MSVC toolchain. This is a rudementary patch, only meant as an RFC for now!!

!! DO NOT COMMIT THIS UPSTREAM !!
---
So, instead of rely on these vcproj files which *will* go stale, we can simply use the same Makefile system which everyone else is using. :) After all, we're just compiling with a different compiler. The end result will still rely on the *msysGit environment* to function, so we already require it. Thus, GNU Make is present, and we can use it.

This implementation is a quick hack to make it compile (hence the RFC subject), so please don't even consider basing anything ontop of it ;)

But, do point out all the do's and don'ts, and I'll try to polish it up to something which we can add to Frank's series..

 Makefile      |   97 +++++++++++++++++++++++++++++++++++++++++++++++---------
 compat/msvc.h |   77 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 158 insertions(+), 16 deletions(-)
Makefile +0 -0
index daf4296..2e14976 100644

Makefile uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') · line 223

Quoted 10 lines
Makefile +4 -0
@@ -214,9 +214,13 @@ uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
 
 CFLAGS = -g -O2 -Wall
 LDFLAGS =
+ARFLAGS = rcs\ # whitespace intentional
 ALL_CFLAGS = $(CFLAGS)
 ALL_LDFLAGS = $(LDFLAGS)
 STRIP ?= strip
+COMPFLAG = -c
+COBJFLAG = -o\ # whitespace intended
+LOBJFLAG = -o\ # whitespace intended

I think it's nicer to write the significant whitespace with non-whitespace text using something like:

empty=
space=$(empty) $(empty)

(...)

Quoted 7 lines

ARFLAGS = rcs$(space)

COBJFLAG = -o$(space)

On the other hand, I think it would be clearer to put the "rcs" in the default version of $(AR), and have a $(AROBJFLAG) set to nothing there, since the "rcs" isn't actually at all like the "-OUT:" with respect to what it's doing there.

Possibly also to have two variables for the output of the toolchain wrapper, one that is before the name of the file and one that's attached to the name of the file.

I agree on all accounts. If we don't go for a wrapper script, as Junio suggested, then I'll definitely do it like you suggested.

--
.marius

#64 lore raw

Re: [PATCH 10/11] Add MSVC Project file

In reply to Frank Li

What about the common-cmds.h that is included in builtin-help.c? How it will be generated?
I followed the instructions in ReadMe, then I can't compile because of this "missing" file.

Quoted 1,631 lines · Frank Li

Add libgit.vcproj to build common library.
Add git.vcproj to build git program.

---
 compat/vcbuild/git/git.vcproj       |  197 +++++
 compat/vcbuild/libgit/libgit.vcproj | 1347
+++++++++++++++++++++++++++++++++++
 2 files changed, 1544 insertions(+), 0 deletions(-)
 create mode 100644 compat/vcbuild/git/git.vcproj
 create mode 100644 compat/vcbuild/libgit/libgit.vcproj
compat/vcbuild/git/git.vcproj new file +21 -0
new file mode 100644
index 0000000..6f85de3
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="gb2312"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="9.00"
+       Name="git"
+       ProjectGUID="{E3E30E51-C5AD-407B-AB43-985E4111474A}"
+       RootNamespace="git"
+       Keyword="Win32Proj"
+       TargetFrameworkVersion="196613"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+

OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"

compat/vcbuild/git/git.vcproj new file +23 -0
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="1"
+                       CharacterSet="0"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+

AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\" +
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"

compat/vcbuild/git/git.vcproj new file +19 -0
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="3"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               DebugInformationFormat="4"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="wininet.lib

ws2_32.lib "

compat/vcbuild/git/git.vcproj new file +30 -0
+                               LinkIncremental="2"
+                               GenerateDebugInformation="true"
+                               SubSystem="1"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+

OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"

compat/vcbuild/git/git.vcproj new file +25 -0
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="1"
+                       CharacterSet="0"
+                       WholeProgramOptimization="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="2"
+                               EnableIntrinsicFunctions="true"
+

AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\" +
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"

compat/vcbuild/git/git.vcproj new file +18 -0
+                               RuntimeLibrary="2"
+                               EnableFunctionLevelLinking="true"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="wininet.lib

ws2_32.lib "

compat/vcbuild/git/git.vcproj new file +37 -0
+                               LinkIncremental="1"
+                               GenerateDebugInformation="true"
+                               SubSystem="1"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+

UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"

compat/vcbuild/git/git.vcproj new file +10 -0
+                       >
+                       <File
+                               RelativePath="..\..\..\git.c"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
+

UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"

compat/vcbuild/git/git.vcproj new file +5 -0
+                       >
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+

Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" +
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"

compat/vcbuild/git/git.vcproj new file +6 -0
+                       >
+               </Filter>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
compat/vcbuild/libgit/libgit.vcproj new file +21 -0
new file mode 100644
index 0000000..bbc3aed
@@ -0,0 +1,1347 @@
+<?xml version="1.0" encoding="gb2312"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="9.00"
+       Name="libgit"
+       ProjectGUID="{F6DEC8C3-B803-4A86-8848-430F08B499E3}"
+       RootNamespace="libgit"
+       Keyword="Win32Proj"
+       TargetFrameworkVersion="196613"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+

OutputDirectory="$(SolutionDir)$(ConfigurationName)"

compat/vcbuild/libgit/libgit.vcproj new file +24 -0
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="4"
+                       CharacterSet="0"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               InlineFunctionExpansion="1"
+

AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\"

compat/vcbuild/libgit/libgit.vcproj new file +39 -0
+                               PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="3"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLibrarianTool"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+

OutputDirectory="$(SolutionDir)$(ConfigurationName)"

compat/vcbuild/libgit/libgit.vcproj new file +26 -0
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="4"
+                       CharacterSet="0"
+                       WholeProgramOptimization="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="2"
+                               InlineFunctionExpansion="1"
+                               EnableIntrinsicFunctions="true"
+

AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\"

compat/vcbuild/libgit/libgit.vcproj new file +43 -0
+                               PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
+                               RuntimeLibrary="2"
+                               EnableFunctionLevelLinking="true"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLibrarianTool"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+

UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"

compat/vcbuild/libgit/libgit.vcproj new file +14 -0
+                       >
+                       <File
+                               RelativePath="..\..\msvc.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\mozilla-sha1\sha1.c"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
+

UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"

compat/vcbuild/libgit/libgit.vcproj new file +273 -0
+                       >
+                       <File
+                               RelativePath="..\..\..\archive.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\attr.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\blob.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\branch.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\bundle.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cache-tree.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cache.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\color.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\commit.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\csum-file.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\decorate.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\delta.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diff.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diffcore.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\dir.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\exec_cmd.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\fetch-pack.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\fsck.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\git-compat-util.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\graph.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\grep.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\hash.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\help.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\http.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\levenshtein.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\list-objects.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\ll-merge.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\log-tree.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\mailmap.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\merge-recursive.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\notes.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\object.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pack-refs.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pack-revindex.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pack.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\parse-options.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\patch-ids.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pkt-line.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\progress.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\quote.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\reachable.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\reflog-walk.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\refs.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\remote.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\rerere.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\revision.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\run-command.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\send-pack.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\sha1-lookup.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\shortlog.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\sideband.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\sigchain.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\strbuf.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\string-list.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\tag.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\tar.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\thread-utils.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\transport.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\tree-walk.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\tree.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\unpack-trees.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\userdiff.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\utf8.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\walker.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\wt-status.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff-interface.h"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+

Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" +
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"

compat/vcbuild/libgit/libgit.vcproj new file +15 -0
+                       >
+               </Filter>
+               <Filter
+                       Name="compat"
+                       >
+                       <File
+                               RelativePath="..\..\..\compat\basename.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\cygwin.h"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\compat\fnmatch\fnmatch.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\compat\fnmatch\fnmatch.h"

compat/vcbuild/libgit/libgit.vcproj new file +36 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\fopen.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\memmem.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\mingw.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\mingw.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\mkdtemp.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\mkstemps.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\pread.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\qsort.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\compat\regex\regex.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\compat\regex\regex.h"

compat/vcbuild/libgit/libgit.vcproj new file +104 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\setenv.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\snprintf.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\strcasestr.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\strlcpy.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\strtoumax.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\unsetenv.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\win32.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\win32mmap.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\winansi.c"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="git"
+                       >
+                       <File
+                               RelativePath="..\..\..\abspath.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\alias.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\alloc.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\archive-tar.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\archive-zip.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\archive.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\attr.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\base85.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\bisect.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\blob.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\branch.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-add.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-annotate.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-apply.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-archive.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-bisect--helper.c"

compat/vcbuild/libgit/libgit.vcproj new file +20 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-blame.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-branch.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-bundle.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-cat-file.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-check-attr.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-check-ref-format.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-checkout-index.c"

compat/vcbuild/libgit/libgit.vcproj new file +16 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-checkout.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-clean.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-clone.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-commit-tree.c"

compat/vcbuild/libgit/libgit.vcproj new file +12 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-commit.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-config.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-count-objects.c"

compat/vcbuild/libgit/libgit.vcproj new file +8 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-describe.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-diff-files.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-diff-index.c"

compat/vcbuild/libgit/libgit.vcproj new file +12 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-diff-tree.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-diff.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-fast-export.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-fetch--tool.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-fetch-pack.c"

compat/vcbuild/libgit/libgit.vcproj new file +8 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-fetch.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-fmt-merge-msg.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-for-each-ref.c"

compat/vcbuild/libgit/libgit.vcproj new file +48 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-fsck.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-gc.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-grep.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-help.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-init-db.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-log.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-ls-files.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-ls-remote.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-ls-tree.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-mailinfo.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-mailsplit.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-merge-base.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-merge-file.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-merge-ours.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-merge-recursive.c"

compat/vcbuild/libgit/libgit.vcproj new file +20 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-merge.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-mktree.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-mv.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-name-rev.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-pack-objects.c"

compat/vcbuild/libgit/libgit.vcproj new file +8 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-pack-refs.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-prune-packed.c"

compat/vcbuild/libgit/libgit.vcproj new file +16 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-prune.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-push.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-read-tree.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-receive-pack.c"

compat/vcbuild/libgit/libgit.vcproj new file +44 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-reflog.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-remote.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-rerere.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-reset.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-rev-list.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-rev-parse.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-revert.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-rm.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-send-pack.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-shortlog.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-show-branch.c"

compat/vcbuild/libgit/libgit.vcproj new file +8 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-show-ref.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-stripspace.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-symbolic-ref.c"

compat/vcbuild/libgit/libgit.vcproj new file +12 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-tag.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-tar-tree.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-unpack-objects.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-update-index.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-update-ref.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-upload-archive.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-verify-pack.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-verify-tag.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-write-tree.c"

compat/vcbuild/libgit/libgit.vcproj new file +447 -1
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\bundle.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cache-tree.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\color.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\combine-diff.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\commit.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\config.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\connect.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\convert.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\copy.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\csum-file.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\ctype.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\date.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\decorate.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diff-delta.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diff-lib.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diff-no-index.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diff.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diffcore-break.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diffcore-delta.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diffcore-order.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diffcore-pickaxe.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diffcore-rename.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\dir.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\editor.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\entry.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\environment.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\exec_cmd.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\fsck.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\graph.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\grep.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\hash.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\help.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\ident.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\levenshtein.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\list-objects.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\ll-merge.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\lockfile.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\log-tree.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\mailmap.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\match-trees.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\merge-file.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\merge-recursive.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\merge-tree.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\name-hash.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\object.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pack-check.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pack-refs.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pack-revindex.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pack-write.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pager.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\parse-options.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\patch-delta.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\patch-ids.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\path.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pkt-line.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\preload-index.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pretty.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\progress.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\quote.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\reachable.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\read-cache.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\reflog-walk.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\refs.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\remote.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\rerere.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\revision.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\run-command.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\server-info.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\setup.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\sha1-lookup.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\sha1_file.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\sha1_name.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\shallow.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\sideband.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\sigchain.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\strbuf.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\string-list.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\symlinks.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\tag.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\thread-utils.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\trace.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\transport.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\tree-diff.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\tree-walk.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\tree.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\unpack-trees.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\usage.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\userdiff.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\utf8.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\walker.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\wrapper.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\write_or_die.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\ws.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\wt-status.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff-interface.c"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="xdiff"
+                       >
+                       <File
+                               RelativePath="..\..\..\xdiff\xdiff.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xdiffi.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xdiffi.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xemit.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xemit.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xinclude.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xmacros.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xmerge.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xpatience.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xprepare.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xprepare.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xtypes.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xutils.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xutils.h"
+                               >
+                       </File>
+               </Filter>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
--

1.6.4.msysgit.0

--
To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#65 lore raw

Re: [PATCH 10/11] Add MSVC Project file

What about the common-cmds.h that is included in builtin-help.c? How it will be generated?
I followed the instructions in ReadMe, then I can't compile because of this "missing" file.

Quoted 1,651 lines · Thiago Farina

What about the common-cmds.h that is included in builtin-help.c? How it will be generated?
I followed the instructions in ReadMe, then I can't compile because of this "missing" file.

Quoted 1,642 lines · Frank Li

Add libgit.vcproj to build common library.
Add git.vcproj to build git program.

---
 compat/vcbuild/git/git.vcproj       |  197 +++++
 compat/vcbuild/libgit/libgit.vcproj | 1347
+++++++++++++++++++++++++++++++++++
 2 files changed, 1544 insertions(+), 0 deletions(-)
 create mode 100644 compat/vcbuild/git/git.vcproj
 create mode 100644 compat/vcbuild/libgit/libgit.vcproj
compat/vcbuild/git/git.vcproj new file +21 -0
new file mode 100644
index 0000000..6f85de3
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="gb2312"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="9.00"
+       Name="git"
+       ProjectGUID="{E3E30E51-C5AD-407B-AB43-985E4111474A}"
+       RootNamespace="git"
+       Keyword="Win32Proj"
+       TargetFrameworkVersion="196613"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+

OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"

compat/vcbuild/git/git.vcproj new file +23 -0
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="1"
+                       CharacterSet="0"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+

AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\" +
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"

compat/vcbuild/git/git.vcproj new file +19 -0
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="3"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               DebugInformationFormat="4"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="wininet.lib

ws2_32.lib "

compat/vcbuild/git/git.vcproj new file +30 -0
+                               LinkIncremental="2"
+                               GenerateDebugInformation="true"
+                               SubSystem="1"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+

OutputDirectory="$(SolutionDir)$(ConfigurationName)\bin"

compat/vcbuild/git/git.vcproj new file +25 -0
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="1"
+                       CharacterSet="0"
+                       WholeProgramOptimization="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="2"
+                               EnableIntrinsicFunctions="true"
+

AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\" +
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"

compat/vcbuild/git/git.vcproj new file +18 -0
+                               RuntimeLibrary="2"
+                               EnableFunctionLevelLinking="true"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="wininet.lib

ws2_32.lib "

compat/vcbuild/git/git.vcproj new file +37 -0
+                               LinkIncremental="1"
+                               GenerateDebugInformation="true"
+                               SubSystem="1"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+

UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"

compat/vcbuild/git/git.vcproj new file +10 -0
+                       >
+                       <File
+                               RelativePath="..\..\..\git.c"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
+

UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"

compat/vcbuild/git/git.vcproj new file +5 -0
+                       >
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+

Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" +
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"

compat/vcbuild/git/git.vcproj new file +6 -0
+                       >
+               </Filter>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
compat/vcbuild/libgit/libgit.vcproj new file +21 -0
new file mode 100644
index 0000000..bbc3aed
@@ -0,0 +1,1347 @@
+<?xml version="1.0" encoding="gb2312"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="9.00"
+       Name="libgit"
+       ProjectGUID="{F6DEC8C3-B803-4A86-8848-430F08B499E3}"
+       RootNamespace="libgit"
+       Keyword="Win32Proj"
+       TargetFrameworkVersion="196613"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+

OutputDirectory="$(SolutionDir)$(ConfigurationName)"

compat/vcbuild/libgit/libgit.vcproj new file +24 -0
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="4"
+                       CharacterSet="0"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               InlineFunctionExpansion="1"
+

AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\" +
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"

compat/vcbuild/libgit/libgit.vcproj new file +38 -0
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="3"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLibrarianTool"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+

OutputDirectory="$(SolutionDir)$(ConfigurationName)"

compat/vcbuild/libgit/libgit.vcproj new file +26 -0
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="4"
+                       CharacterSet="0"
+                       WholeProgramOptimization="1"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="2"
+                               InlineFunctionExpansion="1"
+                               EnableIntrinsicFunctions="true"
+

AdditionalIncludeDirectories="..\..\..;..\..\..\..\zlib;..\..;..\;..\include;..\..\..\compat;..\..\..\compat\fnmatch;..\..\..\compat\regex;.\" +
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"

compat/vcbuild/libgit/libgit.vcproj new file +42 -0
+                               RuntimeLibrary="2"
+                               EnableFunctionLevelLinking="true"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLibrarianTool"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+

UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"

compat/vcbuild/libgit/libgit.vcproj new file +7 -0
+                       >
+                       <File
+                               RelativePath="..\..\msvc.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\mozilla-sha1\sha1.c"

compat/vcbuild/libgit/libgit.vcproj new file +7 -0
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
+

UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"

compat/vcbuild/libgit/libgit.vcproj new file +273 -0
+                       >
+                       <File
+                               RelativePath="..\..\..\archive.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\attr.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\blob.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\branch.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\bundle.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cache-tree.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cache.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\color.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\commit.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\csum-file.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\decorate.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\delta.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diff.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diffcore.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\dir.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\exec_cmd.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\fetch-pack.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\fsck.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\git-compat-util.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\graph.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\grep.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\hash.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\help.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\http.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\levenshtein.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\list-objects.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\ll-merge.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\log-tree.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\mailmap.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\merge-recursive.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\notes.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\object.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pack-refs.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pack-revindex.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pack.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\parse-options.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\patch-ids.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pkt-line.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\progress.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\quote.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\reachable.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\reflog-walk.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\refs.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\remote.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\rerere.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\revision.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\run-command.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\send-pack.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\sha1-lookup.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\shortlog.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\sideband.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\sigchain.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\strbuf.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\string-list.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\tag.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\tar.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\thread-utils.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\transport.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\tree-walk.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\tree.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\unpack-trees.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\userdiff.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\utf8.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\walker.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\wt-status.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff-interface.h"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+

Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" +
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"

compat/vcbuild/libgit/libgit.vcproj new file +15 -0
+                       >
+               </Filter>
+               <Filter
+                       Name="compat"
+                       >
+                       <File
+                               RelativePath="..\..\..\compat\basename.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\cygwin.h"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\compat\fnmatch\fnmatch.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\compat\fnmatch\fnmatch.h"

compat/vcbuild/libgit/libgit.vcproj new file +36 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\fopen.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\memmem.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\mingw.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\mingw.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\mkdtemp.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\mkstemps.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\pread.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\qsort.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\compat\regex\regex.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\compat\regex\regex.h"

compat/vcbuild/libgit/libgit.vcproj new file +12 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\setenv.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\snprintf.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\compat\strcasestr.c"

compat/vcbuild/libgit/libgit.vcproj new file +92 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\strlcpy.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\strtoumax.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\unsetenv.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\win32.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\win32mmap.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\compat\winansi.c"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="git"
+                       >
+                       <File
+                               RelativePath="..\..\..\abspath.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\alias.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\alloc.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\archive-tar.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\archive-zip.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\archive.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\attr.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\base85.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\bisect.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\blob.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\branch.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-add.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-annotate.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-apply.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-archive.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-bisect--helper.c"

compat/vcbuild/libgit/libgit.vcproj new file +20 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-blame.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-branch.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-bundle.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-cat-file.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-check-attr.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-check-ref-format.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-checkout-index.c"

compat/vcbuild/libgit/libgit.vcproj new file +16 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-checkout.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-clean.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-clone.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-commit-tree.c"

compat/vcbuild/libgit/libgit.vcproj new file +12 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-commit.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-config.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-count-objects.c"

compat/vcbuild/libgit/libgit.vcproj new file +8 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-describe.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-diff-files.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-diff-index.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-diff-tree.c"

compat/vcbuild/libgit/libgit.vcproj new file +8 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-diff.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-fast-export.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-fetch--tool.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-fetch-pack.c"

compat/vcbuild/libgit/libgit.vcproj new file +8 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-fetch.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-fmt-merge-msg.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-for-each-ref.c"

compat/vcbuild/libgit/libgit.vcproj new file +32 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-fsck.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-gc.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-grep.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-help.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-init-db.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-log.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-ls-files.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-ls-remote.c"

compat/vcbuild/libgit/libgit.vcproj new file +12 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-ls-tree.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-mailinfo.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-mailsplit.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-merge-base.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-merge-file.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-merge-ours.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-merge-recursive.c"

compat/vcbuild/libgit/libgit.vcproj new file +20 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-merge.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-mktree.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-mv.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-name-rev.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-pack-objects.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-pack-refs.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-prune-packed.c"

compat/vcbuild/libgit/libgit.vcproj new file +12 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-prune.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-push.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-read-tree.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-receive-pack.c"

compat/vcbuild/libgit/libgit.vcproj new file +24 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-reflog.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-remote.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-rerere.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-reset.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-rev-list.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-rev-parse.c"

compat/vcbuild/libgit/libgit.vcproj new file +12 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-revert.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-rm.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-send-pack.c"

compat/vcbuild/libgit/libgit.vcproj new file +8 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-shortlog.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-show-branch.c"

compat/vcbuild/libgit/libgit.vcproj new file +8 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-show-ref.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-stripspace.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-symbolic-ref.c"

compat/vcbuild/libgit/libgit.vcproj new file +12 -0
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-tag.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\builtin-tar-tree.c"
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-unpack-objects.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-update-index.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-update-ref.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-upload-archive.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-verify-pack.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-verify-tag.c"

compat/vcbuild/libgit/libgit.vcproj new file +4 -0
+                               >
+                       </File>
+                       <File
+

RelativePath="..\..\..\builtin-write-tree.c"

compat/vcbuild/libgit/libgit.vcproj new file +447 -1
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\bundle.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\cache-tree.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\color.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\combine-diff.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\commit.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\config.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\connect.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\convert.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\copy.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\csum-file.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\ctype.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\date.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\decorate.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diff-delta.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diff-lib.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diff-no-index.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diff.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diffcore-break.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diffcore-delta.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diffcore-order.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diffcore-pickaxe.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\diffcore-rename.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\dir.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\editor.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\entry.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\environment.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\exec_cmd.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\fsck.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\graph.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\grep.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\hash.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\help.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\ident.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\levenshtein.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\list-objects.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\ll-merge.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\lockfile.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\log-tree.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\mailmap.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\match-trees.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\merge-file.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\merge-recursive.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\merge-tree.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\name-hash.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\object.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pack-check.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pack-refs.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pack-revindex.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pack-write.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pager.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\parse-options.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\patch-delta.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\patch-ids.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\path.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pkt-line.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\preload-index.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\pretty.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\progress.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\quote.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\reachable.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\read-cache.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\reflog-walk.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\refs.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\remote.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\rerere.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\revision.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\run-command.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\server-info.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\setup.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\sha1-lookup.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\sha1_file.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\sha1_name.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\shallow.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\sideband.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\sigchain.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\strbuf.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\string-list.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\symlinks.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\tag.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\thread-utils.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\trace.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\transport.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\tree-diff.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\tree-walk.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\tree.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\unpack-trees.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\usage.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\userdiff.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\utf8.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\walker.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\wrapper.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\write_or_die.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\ws.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\wt-status.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff-interface.c"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="xdiff"
+                       >
+                       <File
+                               RelativePath="..\..\..\xdiff\xdiff.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xdiffi.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xdiffi.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xemit.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xemit.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xinclude.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xmacros.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xmerge.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xpatience.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xprepare.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xprepare.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xtypes.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xutils.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\..\xdiff\xutils.h"
+                               >
+                       </File>
+               </Filter>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
--

1.6.4.msysgit.0

--
To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#66 lore raw

Re: [PATCH 10/11] Add MSVC Project file

In reply to Thiago Farina

Hi,

Quoted 4 lines · Thiago Farina

What about the common-cmds.h that is included in builtin-help.c? How it will be generated?
I followed the instructions in ReadMe, then I can't compile because of this "missing" file.

Thiago, you do not want to top-post in both of the mailing-lists you sent to. And you certainly do _not_ want to send 200K of unanswered, quoted text:

Quoted 3 lines · Frank Li

[200K that were not needed for Thiago's question]

Sorry, but I do not feel inclined to respond to your question if you do not want to adher to netiquette that you must have seen when you first posted to the msysGit mailing list.

Ciao,
Dscho

#67 lore raw

Re: [PATCH 10/11] Add MSVC Project file

Quoted 4 lines · Johannes Schindelin

Hi,

On Mon, 17 Aug 2009, Thiago Farina wrote:

Quoted 9 lines
Quoted 4 lines

What about the common-cmds.h that is included in builtin-help.c? How it will be generated?
I followed the instructions in ReadMe, then I can't compile because of this "missing" file.

Thiago, you do not want to top-post in both of the mailing-lists you sent to.  And you certainly do _not_ want to send 200K of unanswered, quoted text:

I tried to don't do this(top-post), but things goes bad again .

Quoted 12 lines
Quoted 3 lines · Frank Li

[200K that were not needed for Thiago's question]

Sorry, but I do not feel inclined to respond to your question if you do not want to adher to netiquette that you must have seen when you first posted to the msysGit mailing list.

Ciao,
Dscho

author
#79 lore raw

Re: [PATCH 09/11] Add MSVC porting header files.

In reply to Johannes Schindelin
Quoted 4 lines
Quoted 2 lines

Add unix head file, dirent.h, unistd.h  and time.h

These are copied from somewhere.  From where?  What is the license?

It comes from msys, which used to build msysgit.

Quoted 3 lines
Quoted 1 line

Add MSVC special porting head file msvc.h and msvc.c.

This is added by you.  Logically, that should be a separate patch.

Okay I will split.

Quoted 23 lines
Quoted 9 lines
compat/msvc.h new file +9 -0
+#define NO_MEMMEM
+#define NO_C99_FORMAT
+#define NO_STRTOUMAX
+#define NO_MKDTEMP
+#define NO_MKSTEMPS
+
+#define RUNTIME_PREFIX
+#define NO_ST_BLOCKS_IN_STRUCT_STAT
+#define NO_NSEC

compat/msvc.h line 40

Quoted 10 lines
compat/msvc.h new file +10 -0
+#define USE_WIN32_MMAP
+#define USE_NED_ALLOCATOR
+
+#define NO_REGEX
+
+#define NO_SYS_SELECT_H
+#define NO_PTHEADS
+#define HAVE_STRING_H 1
+#define STDC_HEADERS
+#define NO_ICONV

These would normally be defined in the Makefile.  You might want to state that in a comment.

Quoted 2 lines

Or maybe move the definitions (along with vsnprintf) to the .vcproj file, which is the logical pendant of the Makefile?

I really want to in .vcproj. but the same context needs to copy DEBUG\RELEASE 32\64bit, libgit.vcproj and git.vcproj. 8 place needs copy. To avoid copy in vcproj file, I move it hear.

#80 lore raw

Re: [PATCH 09/11] Add MSVC porting header files.

Hi,

Quoted 5 lines · Frank Li
Quoted 3 lines
Quoted 1 line

Add unix head file, dirent.h, unistd.h  and time.h

These are copied from somewhere.  From where?  What is the license?

It comes from msys, which used to build msysgit.

I know. After reading the patch. But it would be better if everybody knew after reading the commit message... _Especially_ in this increasingly lawsuit-defined business, it is very nice to see early that the files you are including here are in the public domain, and come from MSys.

Quoted 3 lines

I really want to in .vcproj. but the same context needs to copy DEBUG\RELEASE 32\64bit, libgit.vcproj and git.vcproj. 8 place needs copy. To avoid copy in vcproj file, I move it hear.

As I said earlier, there are common flags, but as I also said, it is probably better to keep the #define's in a header file for better visibility and editability, albeit in logically clustered blocks (i.e. all the NO_* and other #define's that affect what source code is compiled, all default paths in another cluster, #define's to bow before Microsoft's C runtime's decision to deprecate the C99 standard function names, etc)

BTW it is funny that your typos seem to be influenced by the _sound_ of the word ("hear" instead of "here"), rather than just simple transposed letters... most of my typos are the same ;-)

Ciao,
Dscho

#81 lore raw

Re: [PATCH 09/11] Add MSVC porting header files.

Quoted 8 lines · Johannes Schindelin

Hi,

Quoted 4 lines · Frank Li
Quoted 3 lines
Quoted 1 line

Add unix head file, dirent.h, unistd.h  and time.h

These are copied from somewhere.  From where?  What is the license?

Quoted 7 lines
Quoted 1 line

It comes from msys, which used to build msysgit.

I know. After reading the patch. But it would be better if everybody knew after reading the commit message... _Especially_ in this increasingly lawsuit-defined business, it is very nice to see early that the files you are including here are in the public domain, and come from MSys.

And there was this line in the snarfed file:

* No warranty is given; refer to the file DISCLAIMER within the package.

but there no DISCLAIMER file (perhaps a separate patch added it, but I somehow doubt it).

Quoted 7 lines

As I said earlier, there are common flags, but as I also said, it is probably better to keep the #define's in a header file for better visibility and editability, albeit in logically clustered blocks (i.e. all the NO_* and other #define's that affect what source code is compiled, all default paths in another cluster, #define's to bow before Microsoft's C runtime's decision to deprecate the C99 standard function names, etc)

... and that can live in a separate header file to reduce clutter and shield people who do not need to look at MSC related code, no?

#82 lore raw

Re: [PATCH 09/11] Add MSVC porting header files.

Hi,

Quoted 10 lines · Junio C Hamano
Quoted 7 lines · Johannes Schindelin

As I said earlier, there are common flags, but as I also said, it is probably better to keep the #define's in a header file for better visibility and editability, albeit in logically clustered blocks (i.e. all the NO_* and other #define's that affect what source code is compiled, all default paths in another cluster, #define's to bow before Microsoft's C runtime's decision to deprecate the C99 standard function names, etc)

Quoted 2 lines

... and that can live in a separate header file to reduce clutter and shield people who do not need to look at MSC related code, no?

Maybe we could call it compat/msvc.h? ;-)

Ciao,
Dscho

author
#84 lore raw

Re: [PATCH 08/11] Place __stdcall to correct position.

In reply to Johannes Schindelin
Quoted 3 lines

How about "... to the correct ..." and "MSVC requires _stdcall to be between return value..." and "All Win32 API functions are declared with the WINAPI attribute."?

WINAPI always like

BOOL WINAPI function_name(xxx);
It compile fail if WINAPI BOOL function_name(xxx);

Quoted 4 lines
Quoted 4 lines

 #if defined(__MINGW32__) || defined(_MSC_VER)

run-command.c +1 -1
-static __stdcall unsigned run_thread(void *data)
+static unsigned __stdcall run_thread(void *data)

 {

Quoted 9 lines

run-command.c int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const · line 303

Quoted 5 lines

      struct async *async = data;
      return async->proc(async->fd_for_proc, async->data); }

run-command.c +1 -1
-#endif
+#endif /* __MINGW32__ || _MSC_VER */

I do not think this is necessary.  There are only 5 lines wrapped into those #ifdef guards, the developer should be able to see that far.

Do you means remove /* __MINGW32__ || _MSC_VER */?

#85 lore raw

Re: [PATCH 08/11] Place __stdcall to correct position.

Hi,

Quoted 8 lines · Frank Li
Quoted 3 lines

How about "... to the correct ..." and "MSVC requires _stdcall to be between return value..." and "All Win32 API functions are declared with the WINAPI attribute."?

WINAPI always like

BOOL WINAPI function_name(xxx);
It compile fail if WINAPI BOOL function_name(xxx);

Oh, okay, so let's say

	Furthermore, Microsoft Visual C++ requires the order

		BOOL WINAPI function();

	instead of

		WINAPI BOOL function();
Quoted 13 lines
Quoted 4 lines
Quoted 4 lines

 #if defined(__MINGW32__) || defined(_MSC_VER)

run-command.c +1 -1
-static __stdcall unsigned run_thread(void *data)
+static unsigned __stdcall run_thread(void *data)

 {

Quoted 9 lines

run-command.c int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const · line 303

Quoted 5 lines

      struct async *async = data;
      return async->proc(async->fd_for_proc, async->data); }

run-command.c +1 -1
-#endif
+#endif /* __MINGW32__ || _MSC_VER */

I do not think this is necessary.  There are only 5 lines wrapped into those #ifdef guards, the developer should be able to see that far.

Quoted 1 line

Do you means remove /* __MINGW32__ || _MSC_VER */?

I was talking about this change:

run-command.c int run_command_v_opt_cd_env(const char **argv, int opt, const char *dir, const · line 303

Quoted 2 lines
run-command.c +1 -1
-#endif
+#endif /* __MINGW32__ || _MSC_VER */

which is IMHO distracting rather than helpful.

Ciao,
Dscho

author
#87 lore raw

Re: [PATCH 07/11] Add O_BINARY flag to open flag at mingw.c

In reply to Johannes Schindelin
Quoted 11 lines

How about this instead?

       mingw.c: Use the O_BINARY flag to open files

       On Windows, non-text files must be opened using the O_BINARY flag. MinGW does this for us automatically, but Microsoft Visual C++ does not.

       Also, Johannes said that this would be a nice cleanup.

Okay, Do you need me change commit comments to resubmit patch?

Quoted 1 line

BTW what about fopen()?

I never found problem at fopen, I will double check it.

Quoted 6 lines

Patch is obviously good.

Ciao,
Dscho

#88 lore raw

Re: [PATCH 07/11] Add O_BINARY flag to open flag at mingw.c

Hi,

Quoted 4 lines · Frank Li
Quoted 4 lines

How about this instead?

       mingw.c: Use the O_BINARY flag to open files

Quoted 8 lines
Quoted 6 lines

       On Windows, non-text files must be opened using the O_BINARY flag. MinGW does this for us automatically, but Microsoft Visual C++ does not.

       Also, Johannes said that this would be a nice cleanup.

Okay, Do you need me change commit comments to resubmit patch?

How about updating your branch at tgit.git with the new commit messages first? (Use rebase -i...)

Quoted 3 lines
Quoted 1 line

BTW what about fopen()?

I never found problem at fopen, I will double check it.

Well, it is better to be sure, not by testing it, but rather by inspecting the code paths. Is there any way Git wants to open a binary file with fopen()? If so, it cannot use the modes "r" and "w" there, but must use "rb" and "wb".

It gets doubly complicated if there are code paths that _want_ to open text files (such as .git/config), which are user-writable, so they could (in theory) contain CR/LF line endings.

Ciao,
Dscho

Quoted 8 lines
Quoted 7 lines

Patch is obviously good.

Ciao,
Dscho

P.S.: please remove such quoted text, it is totally uninteresting in this context (you do not reply to it, either).

#49 lore raw

Re: [msysGit] Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

In reply to Johannes Schindelin

Johannes Schindelin said the following on 19.08.2009 10:29:

Quoted 11 lines

Hi,

Quoted 1 line · Marius Storm-Olsen

The full IDE support is secondary, first because you *can* use the IDE already, and second because it'll be harder to whip something up which guarantees that the vcproj support stays in-sync at all times and won't lag behind.

I think the point of Frank's patches is to make Visual Studio users comfortable with Git. You cannot ask those to use a build process or an IDE they are not used to.

Quoted 1 line

Of course, if someone has a huge itch to restructure the current Makefile; factoring out the files into a file which can simply be included in the current Makefile, and easily parsed by a script, or included by CMake, then that can be done in parallel and possible added to git mainline before the MSVC support patches from Frank.

I still think it would be possible to use a combination of a Makefile rule and GNU make features to spit out a list of targets and their dependet .h and .c files.

Ok, but you would still have to rely on GNU Make in this setup, and it would have to generate the common_cmds.h before you can even compile with the MSVC IDE.

--
.marius

#50 lore raw

Re: [msysGit] Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Hi,

Quoted 20 lines · Marius Storm-Olsen

Johannes Schindelin said the following on 19.08.2009 10:29:

Quoted 19 lines

Hi,

Quoted 4 lines · Marius Storm-Olsen

The full IDE support is secondary, first because you *can* use the IDE already, and second because it'll be harder to whip something up which guarantees that the vcproj support stays in-sync at all times and won't lag behind.

I think the point of Frank's patches is to make Visual Studio users comfortable with Git. You cannot ask those to use a build process or an IDE they are not used to.

Quoted 5 lines

Of course, if someone has a huge itch to restructure the current Makefile; factoring out the files into a file which can simply be included in the current Makefile, and easily parsed by a script, or included by CMake, then that can be done in parallel and possible added to git mainline before the MSVC support patches from Frank.

Quoted 7 lines
Quoted 3 lines

I still think it would be possible to use a combination of a Makefile rule and GNU make features to spit out a list of targets and their dependet .h and .c files.

Ok, but you would still have to rely on GNU Make in this setup, and it would have to generate the common_cmds.h before you can even compile with the MSVC IDE.

But then I could bundle it up and give it to a Visual Studio user and they do not need msysGit.

But maybe we should require them to have msysGit? After all, if the package is too small, no Windows developer will take it seriously, right? ;-)

Ciao,
Dscho

#51 lore raw

Re: [msysGit] Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Johannes Schindelin said the following on 19.08.2009 14:56:

Quoted 11 lines · Marius Storm-Olsen
Quoted 3 lines

Ok, but you would still have to rely on GNU Make in this setup, and it would have to generate the common_cmds.h before you can even compile with the MSVC IDE.

But then I could bundle it up and give it to a Visual Studio user and they do not need msysGit.

But maybe we should require them to have msysGit? After all, if the package is too small, no Windows developer will take it seriously, right? ;-)

They would still require the rest of the msysgit environment to be able to use the result. Not until we have zero scripts left as git commands can we ditch the msysgit environment. So yes, even for msvc-built git is msysgit required. Its just not build with MinGW.

--
.marius

#52 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

Quoted 4 lines · Marius Storm-Olsen

They would still require the rest of the msysgit environment to be able to use the result. Not until we have zero scripts left as git commands can we ditch the msysgit environment. So yes, even for msvc-built git is msysgit required. Its just not build with MinGW.

...perhaps support for msvc for a subset of git-core (without all shell scripts, that is) is just the incentive some windows-developers need to start developing c-versions of the lacking functionality? A pure C git-core would IMO be the ideal case. Utilities could still be scripted on top of this through bindings given that the developer have perl installed, no?

Signature · 3 lines
Erik "kusma" Faye-Lund
[email protected]
(+47) 986 59 656
#53 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

In reply to Johannes Schindelin

----- Original Message -----
From: Johannes Schindelin
Date: 8/19/2009 1:16 AM

Quoted 2 lines

Using a Makefile from within Visual Studio is just not the intended way to do things, so you will hit the limitations sooner or later.

I use Visual Studio makefile projects daily and have for years. In my case, an additional script takes the Jam build scripts and creates the .vcproj files with the proper file lists and project source folders. These Makefile .vcproj files have full support for Intellisense, debugging, and nearly everything else. The only thing a Makefile project doesn't seem to expose is single file compilation.

Josh

#60 lore raw

Re: [RFC] Enable compilation by Makefile for the MSVC toolchain

In reply to Marius Storm-Olsen

Hi,

Quoted 7 lines · Marius Storm-Olsen

Johannes Schindelin said the following on 18.08.2009 16:11:

Quoted 4 lines · Marius Storm-Olsen
Quoted 3 lines
Makefile +1 -0
+ifneq (,$(findstring Microsoft Visual Studio, $(INCLUDE)))

...

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

+else
ifneq (,$(findstring MINGW,$(uname_S)))
pathsep = ;
NO_PREAD = YesPlease

This means that gcc is never used when Visual C++ is available? Hmm.

Yes it does :)

As you know, I do not own a Windows computer. On the Windows computer I am allowed to use sometimes to test Git and my day-time project, the Express edition was installed, but it was never registered, so it is not usable, and I would not want to use it anyway.

So this change would break my setup.

Quoted 2 lines

I was actually going to replace it with a USE_MSVC variable check instead though, so you'd rather do 'make USE_MSVC=1'

That's much nicer, especially since you can put that into config.mak.

Quoted 16 lines
Quoted 8 lines
Quoted 8 lines
compat/msvc.h +0 -0
index 6071565..a9d5f7f 100644
@@ -10,50 +10,120 @@
 
 /*Configuration*/
 
Quoted 7 lines

compat/msvc.h line 15

Quoted 3 lines
compat/msvc.h +2 -0
+#ifndef NO_PREAD
 #define NO_PREAD
+#endif

Why? You now have the stuff in two places. If you want to keep them in compat/msvc.h to be able to generate .vcproj files, I'd rather not have them duplicated in the Makefile.

Quoted 3 lines

The changes to the msvc.h where added just keep Frank's vcproj project working. I would have just nuked all that stuff in the msvc.h since the Makefile would just provide it for me anyways..

So maybe you and Frank (and Pau) hash out what you want?

Ciao,
Dscho