git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/4] Makefile: keep MSVC and Cygwin configuration separate

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Oct 27, 2009, 19:13 UTC
Message-ID
<4AE74659.6020503@ramsay1.demon.co.uk>
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
 Makefile |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 8e1cfc5..12c8249 100644
--- a/Makefile
+++ b/Makefile
@@ -658,6 +658,14 @@ EXTLIBS =
 # Platform specific tweaks
 #
 
+ifdef MSVC
+	# When building with msvc, on MinGW or Cygwin, we
+	# override the uname settings to make it easier to
+	# keep the configuration sections separate
+	uname_S = Windows
+	uname_O = Windows
+endif
+
 # We choose to avoid "if .. else if .. else .. endif endif"
 # because maintaining the nesting to match is a pain.  If
 # we had "elif" things would have been much nicer...
@@ -893,7 +901,7 @@ ifeq ($(uname_S),HP-UX)
 	NO_SYS_SELECT_H = YesPlease
 	SNPRINTF_RETURNS_BOGUS = YesPlease
 endif
-ifdef MSVC
+ifeq ($(uname_S),Windows)
 	GIT_VERSION := $(GIT_VERSION).MSVC
 	pathsep = ;
 	NO_PREAD = YesPlease
@@ -945,7 +953,7 @@ else
 	BASIC_CFLAGS += -Zi -MTd
 endif
 	X = .exe
-else
+endif
 ifneq (,$(findstring MINGW,$(uname_S)))
 	pathsep = ;
 	NO_PREAD = YesPlease
@@ -994,7 +1002,6 @@ else
 	NO_PTHREADS = YesPlease
 endif
 endif
-endif
 
 -include config.mak.autogen
 -include config.mak
-- 
1.6.5
Next: Johannes Sixt
Message 1 of 3 in “Makefile: keep MSVC and Cygwin configuration separate”
  1. 3/4 Makefile: keep MSVC and Cygwin configuration separateRamsay Jones, Oct 27, 2009
  2. Johannes SixtNov 3, 2009
  3. Ramsay JonesNov 4, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.