{"thread":{"id":"21521","subject":"[PATCH v2 2/4] Makefile: keep MSVC and Cygwin configuration separate","startedAt":"2009-11-07T20:08:01Z","lastAt":"2009-11-07T20:08:01Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":2,"patchTotal":4},"messages":[{"id":"127054","messageId":"4AF5D3A1.7080001@ramsay1.demon.co.uk","threadId":"21521","inReplyTo":null,"subject":"[PATCH v2 2/4] Makefile: keep MSVC and Cygwin configuration separate","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2009-11-07T20:08:01Z","receivedAt":"2009-11-07T20:08:01Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nChanges from v1:\n    - moved the \"ifdef MSVC\" section up to just after the block\n      which sets up uname_S, uname_O, etc.\n    - use simple assignment ':=' rather than recursive assignment\n      in the uname override block\n\n Makefile |   11 ++++++++---\n 1 files changed, 8 insertions(+), 3 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 8e1cfc5..306ca86 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -212,6 +212,12 @@ uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')\n uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')\n uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')\n \n+ifdef MSVC\n+\t# avoid the MingW and Cygwin configuration sections\n+\tuname_S := Windows\n+\tuname_O := Windows\n+endif\n+\n # CFLAGS and LDFLAGS are for the users to override from the command line.\n \n CFLAGS = -g -O2 -Wall\n@@ -893,7 +899,7 @@ ifeq ($(uname_S),HP-UX)\n \tNO_SYS_SELECT_H = YesPlease\n \tSNPRINTF_RETURNS_BOGUS = YesPlease\n endif\n-ifdef MSVC\n+ifeq ($(uname_S),Windows)\n \tGIT_VERSION := $(GIT_VERSION).MSVC\n \tpathsep = ;\n \tNO_PREAD = YesPlease\n@@ -945,7 +951,7 @@ else\n \tBASIC_CFLAGS += -Zi -MTd\n endif\n \tX = .exe\n-else\n+endif\n ifneq (,$(findstring MINGW,$(uname_S)))\n \tpathsep = ;\n \tNO_PREAD = YesPlease\n@@ -994,7 +1000,6 @@ else\n \tNO_PTHREADS = YesPlease\n endif\n endif\n-endif\n \n -include config.mak.autogen\n -include config.mak\n-- \n1.6.5\n"}]}