{"thread":{"id":"21385","subject":"[PATCH 3/4] Makefile: keep MSVC and Cygwin configuration separate","startedAt":"2009-10-27T19:13:29Z","lastAt":"2009-11-04T19:29:09Z","messageCount":3,"participants":["Ramsay Jones","Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"126053","messageId":"4AE74659.6020503@ramsay1.demon.co.uk","threadId":"21385","inReplyTo":null,"subject":"[PATCH 3/4] Makefile: keep MSVC and Cygwin configuration separate","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2009-10-27T19:13:29Z","receivedAt":"2009-10-27T19:13:29Z","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 Makefile |   13 ++++++++++---\n 1 files changed, 10 insertions(+), 3 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 8e1cfc5..12c8249 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -658,6 +658,14 @@ EXTLIBS =\n # Platform specific tweaks\n #\n \n+ifdef MSVC\n+\t# When building with msvc, on MinGW or Cygwin, we\n+\t# override the uname settings to make it easier to\n+\t# keep the configuration sections separate\n+\tuname_S = Windows\n+\tuname_O = Windows\n+endif\n+\n # We choose to avoid \"if .. else if .. else .. endif endif\"\n # because maintaining the nesting to match is a pain.  If\n # we had \"elif\" things would have been much nicer...\n@@ -893,7 +901,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 +953,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 +1002,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"},{"id":"126628","messageId":"4AEFDB6B.8010209@viscovery.net","threadId":"21385","inReplyTo":"4AE74659.6020503@ramsay1.demon.co.uk","subject":"Re: [PATCH 3/4] Makefile: keep MSVC and Cygwin configuration separate","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2009-11-03T07:27:39Z","receivedAt":"2009-11-03T07:27:39Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Ramsay Jones schrieb:\n> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n> ---\n>  Makefile |   13 ++++++++++---\n>  1 files changed, 10 insertions(+), 3 deletions(-)\n> \n> diff --git a/Makefile b/Makefile\n> index 8e1cfc5..12c8249 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -658,6 +658,14 @@ EXTLIBS =\n>  # Platform specific tweaks\n>  #\n>  \n> +ifdef MSVC\n> +\t# When building with msvc, on MinGW or Cygwin, we\n> +\t# override the uname settings to make it easier to\n> +\t# keep the configuration sections separate\n> +\tuname_S = Windows\n> +\tuname_O = Windows\n> +endif\n> +\n>  # We choose to avoid \"if .. else if .. else .. endif endif\"\n>  # because maintaining the nesting to match is a pain.  If\n>  # we had \"elif\" things would have been much nicer...\n> @@ -893,7 +901,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 +953,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 +1002,6 @@ else\n>  \tNO_PTHREADS = YesPlease\n>  endif\n>  endif\n> -endif\n>  \n>  -include config.mak.autogen\n>  -include config.mak\n\nI like the direction of this change, but I think that you must use ':='\nassignment, and I would put this right after the uname_* assignments at\nthe beginning of the Makefile:\n\n uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')\n+ifdef MSVC\n+\tuname_S := Windows\n+\tuname_O := Windows\t# avoid cygwin configuration\n+endif\n\n-- Hannes\n"},{"id":"126821","messageId":"4AF1D605.1020900@ramsay1.demon.co.uk","threadId":"21385","inReplyTo":"4AEFDB6B.8010209@viscovery.net","subject":"Re: [PATCH 3/4] Makefile: keep MSVC and Cygwin configuration separate","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2009-11-04T19:29:09Z","receivedAt":"2009-11-04T19:29:09Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Johannes Sixt wrote:\n> \n> I like the direction of this change, but I think that you must use ':='\n\nYeah, I've always been a bit sloppy with recursive assignment versus simple\nassignment when the value does not contain a variable reference ;-)\nSo yes, you are right...\n\n> assignment, and I would put this right after the uname_* assignments at\n> the beginning of the Makefile:\n> \n>  uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')\n> +ifdef MSVC\n> +\tuname_S := Windows\n> +\tuname_O := Windows\t# avoid cygwin configuration\n> +endif\n\nOK with me. (but you are avoiding the MinGW configuration as well...)\n\nATB,\nRamsay Jones\n"}]}