* [PATCH 3/4] Makefile: keep MSVC and Cygwin configuration separate
@ 2009-10-27 19:13 Ramsay Jones
2009-11-03 7:27 ` Johannes Sixt
0 siblings, 1 reply; 3+ messages in thread
From: Ramsay Jones @ 2009-10-27 19:13 UTC (permalink / raw)
To: Junio C Hamano; +Cc: GIT Mailing-list, Marius Storm-Olsen
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 3/4] Makefile: keep MSVC and Cygwin configuration separate
2009-10-27 19:13 [PATCH 3/4] Makefile: keep MSVC and Cygwin configuration separate Ramsay Jones
@ 2009-11-03 7:27 ` Johannes Sixt
2009-11-04 19:29 ` Ramsay Jones
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Sixt @ 2009-11-03 7:27 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Junio C Hamano, GIT Mailing-list, Marius Storm-Olsen
Ramsay Jones schrieb:
> 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
I like the direction of this change, but I think that you must use ':='
assignment, and I would put this right after the uname_* assignments at
the beginning of the Makefile:
uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
+ifdef MSVC
+ uname_S := Windows
+ uname_O := Windows # avoid cygwin configuration
+endif
-- Hannes
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 3/4] Makefile: keep MSVC and Cygwin configuration separate
2009-11-03 7:27 ` Johannes Sixt
@ 2009-11-04 19:29 ` Ramsay Jones
0 siblings, 0 replies; 3+ messages in thread
From: Ramsay Jones @ 2009-11-04 19:29 UTC (permalink / raw)
To: Johannes Sixt; +Cc: Junio C Hamano, GIT Mailing-list, Marius Storm-Olsen
Johannes Sixt wrote:
>
> I like the direction of this change, but I think that you must use ':='
Yeah, I've always been a bit sloppy with recursive assignment versus simple
assignment when the value does not contain a variable reference ;-)
So yes, you are right...
> assignment, and I would put this right after the uname_* assignments at
> the beginning of the Makefile:
>
> uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
> +ifdef MSVC
> + uname_S := Windows
> + uname_O := Windows # avoid cygwin configuration
> +endif
OK with me. (but you are avoiding the MinGW configuration as well...)
ATB,
Ramsay Jones
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-04 20:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-27 19:13 [PATCH 3/4] Makefile: keep MSVC and Cygwin configuration separate Ramsay Jones
2009-11-03 7:27 ` Johannes Sixt
2009-11-04 19:29 ` Ramsay Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.