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

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

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Nov 7, 2009, 20:08 UTC
Message-ID
<4AF5D3A1.7080001@ramsay1.demon.co.uk>
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
Changes from v1:
    - moved the "ifdef MSVC" section up to just after the block
      which sets up uname_S, uname_O, etc.
    - use simple assignment ':=' rather than recursive assignment
      in the uname override block
 Makefile |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 8e1cfc5..306ca86 100644
--- a/Makefile
+++ b/Makefile
@@ -212,6 +212,12 @@ uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
 uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
 uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
 
+ifdef MSVC
+	# avoid the MingW and Cygwin configuration sections
+	uname_S := Windows
+	uname_O := Windows
+endif
+
 # CFLAGS and LDFLAGS are for the users to override from the command line.
 
 CFLAGS = -g -O2 -Wall
@@ -893,7 +899,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 +951,7 @@ else
 	BASIC_CFLAGS += -Zi -MTd
 endif
 	X = .exe
-else
+endif
 ifneq (,$(findstring MINGW,$(uname_S)))
 	pathsep = ;
 	NO_PREAD = YesPlease
@@ -994,7 +1000,6 @@ else
 	NO_PTHREADS = YesPlease
 endif
 endif
-endif
 
 -include config.mak.autogen
 -include config.mak
-- 
1.6.5
Message 1 of 1 in “Makefile: keep MSVC and Cygwin configuration separate”
  1. 2/4 Makefile: keep MSVC and Cygwin configuration separateRamsay Jones, Nov 7, 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.