From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Marius Storm-Olsen <mstormo@gmail.com>
Cc: msysgit@googlegroups.com, git@vger.kernel.org, lznuaa@gmail.com,
bonzini@gnu.org, kusmabite@googlemail.com
Subject: Re: [RFC] Enable compilation by Makefile for the MSVC toolchain
Date: Tue, 18 Aug 2009 16:11:10 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.1.00.0908181605370.4680@intel-tinevez-2-302> (raw)
In-Reply-To: <1250600335-8642-1-git-send-email-mstormo@gmail.com>
Hi,
On Tue, 18 Aug 2009, Marius Storm-Olsen wrote:
> 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).
> diff --git a/Makefile b/Makefile
> index daf4296..2e14976 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -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.
> @@ -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
This means that gcc is never used when Visual C++ is available? Hmm.
> diff --git a/compat/msvc.h b/compat/msvc.h
> index 6071565..a9d5f7f 100644
> --- a/compat/msvc.h
> +++ b/compat/msvc.h
> @@ -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
next prev parent reply other threads:[~2009-08-18 14:11 UTC|newest]
Thread overview: 91+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-17 16:04 [PATCH 06/11] Add miss git-compat-util.h at regex.c and fnmatch.c Add git-compat-util.h to enable build at MSVC environment Frank Li
2009-08-17 16:04 ` [PATCH 07/11] Add O_BINARY flag to open flag at mingw.c Frank Li
2009-08-17 16:04 ` [PATCH 08/11] Place __stdcall to correct position Frank Li
2009-08-17 16:05 ` [PATCH 09/11] Add MSVC porting header files Frank Li
2009-08-17 16:05 ` [PATCH 10/11] Add MSVC Project file Frank Li
2009-08-17 17:11 ` Johannes Schindelin
2009-08-17 17:34 ` Paolo Bonzini
2009-08-17 17:40 ` Erik Faye-Lund
2009-08-17 18:16 ` Paolo Bonzini
2009-08-17 19:53 ` Johannes Schindelin
2009-08-17 20:02 ` Paolo Bonzini
2009-08-17 20:54 ` Johannes Schindelin
2009-08-17 20:17 ` Pau Garcia i Quiles
2009-08-17 20:43 ` Reece Dunn
2009-08-17 20:54 ` Pau Garcia i Quiles
2009-08-17 21:05 ` Reece Dunn
2009-08-17 22:17 ` Johan 't Hart
2009-08-17 21:05 ` Johannes Schindelin
2009-08-17 21:23 ` Pau Garcia i Quiles
2009-08-17 22:10 ` Johannes Schindelin
2009-08-17 22:19 ` Pau Garcia i Quiles
2009-08-17 22:21 ` Paolo Bonzini
2009-08-17 22:32 ` Thiago Farina
2009-08-17 22:33 ` Thiago Farina
2009-08-17 20:56 ` Johannes Schindelin
2009-08-17 20:59 ` Pau Garcia i Quiles
2009-08-17 21:11 ` Johannes Schindelin
2009-08-17 22:26 ` Johan 't Hart
2009-08-17 23:00 ` Pau Garcia i Quiles
2009-08-17 23:40 ` Johannes Schindelin
2009-08-17 22:44 ` Pau Garcia i Quiles
2009-08-18 12:58 ` [RFC] Enable compilation by Makefile for the MSVC toolchain Marius Storm-Olsen
2009-08-18 13:01 ` Marius Storm-Olsen
2009-08-18 13:09 ` Erik Faye-Lund
2009-08-18 14:11 ` Johannes Schindelin [this message]
2009-08-18 17:07 ` Pau Garcia i Quiles
2009-08-18 21:35 ` Johannes Schindelin
2009-08-18 17:55 ` Marius Storm-Olsen
2009-08-18 18:42 ` Daniel Barkalow
2009-08-18 21:57 ` Johannes Schindelin
2009-08-19 9:58 ` Johannes Schindelin
2009-08-18 16:22 ` Johan 't Hart
2009-08-18 16:28 ` Reece Dunn
2009-08-18 17:06 ` Pau Garcia i Quiles
2009-08-18 17:44 ` Paolo Bonzini
2009-08-18 16:51 ` Junio C Hamano
2009-08-18 17:36 ` Marius Storm-Olsen
2009-08-18 17:41 ` Johan 't Hart
2009-08-18 18:06 ` Marius Storm-Olsen
2009-08-18 21:53 ` Johannes Schindelin
2009-08-18 22:02 ` Erik Faye-Lund
2009-08-18 22:38 ` Johannes Schindelin
2009-08-18 22:48 ` Erik Faye-Lund
2009-08-19 7:16 ` Johannes Schindelin
2009-08-19 7:29 ` Marius Storm-Olsen
2009-08-19 8:29 ` Johannes Schindelin
2009-08-19 8:56 ` Thomas Berg
2009-08-19 10:59 ` [msysGit] " Marius Storm-Olsen
2009-08-19 12:56 ` Johannes Schindelin
2009-08-19 13:26 ` Marius Storm-Olsen
2009-08-19 14:51 ` Erik Faye-Lund
2009-08-19 13:04 ` Joshua Jensen
2009-08-18 16:51 ` Daniel Barkalow
2009-08-18 17:38 ` Marius Storm-Olsen
2009-08-17 22:27 ` [PATCH 10/11] Add MSVC Project file Thiago Farina
2009-08-17 22:29 ` Thiago Farina
2009-08-17 22:39 ` Johannes Schindelin
2009-08-17 22:50 ` Thiago Farina
2009-08-17 17:09 ` [PATCH 09/11] Add MSVC porting header files Johannes Schindelin
2009-08-17 19:31 ` Pau Garcia i Quiles
2009-08-17 19:48 ` CMake, was " Johannes Schindelin
2009-08-17 19:51 ` Pau Garcia i Quiles
2009-08-17 19:54 ` Pau Garcia i Quiles
2009-08-17 20:58 ` Johannes Schindelin
2009-08-17 21:03 ` Pau Garcia i Quiles
2009-08-17 21:20 ` Reece Dunn
2009-08-17 21:29 ` Pau Garcia i Quiles
2009-08-17 20:07 ` [msysGit] " Johannes Sixt
2009-08-18 2:15 ` Frank Li
2009-08-18 9:47 ` Johannes Schindelin
2009-08-18 10:42 ` Junio C Hamano
2009-08-18 13:01 ` Johannes Schindelin
2009-08-17 19:21 ` [msysGit] " Johannes Sixt
2009-08-17 17:01 ` [PATCH 08/11] Place __stdcall to correct position Johannes Schindelin
2009-08-18 1:51 ` Frank Li
2009-08-18 9:36 ` Johannes Schindelin
2009-08-17 16:58 ` [PATCH 07/11] Add O_BINARY flag to open flag at mingw.c Johannes Schindelin
2009-08-18 2:02 ` Frank Li
2009-08-18 9:40 ` Johannes Schindelin
2009-08-17 16:51 ` [PATCH 06/11] Add miss git-compat-util.h at regex.c and fnmatch.c Add git-compat-util.h to enable build at MSVC environment Johannes Schindelin
2009-08-17 19:23 ` Johannes Sixt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.1.00.0908181605370.4680@intel-tinevez-2-302 \
--to=johannes.schindelin@gmx.de \
--cc=bonzini@gnu.org \
--cc=git@vger.kernel.org \
--cc=kusmabite@googlemail.com \
--cc=lznuaa@gmail.com \
--cc=mstormo@gmail.com \
--cc=msysgit@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).