From: Johannes Sixt <j.sixt@viscovery.net>
To: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Cc: Junio C Hamano <gitster@pobox.com>,
GIT Mailing-list <git@vger.kernel.org>,
Marius Storm-Olsen <mstormo@gmail.com>
Subject: Re: [PATCH 3/4] Makefile: keep MSVC and Cygwin configuration separate
Date: Tue, 03 Nov 2009 08:27:39 +0100 [thread overview]
Message-ID: <4AEFDB6B.8010209@viscovery.net> (raw)
In-Reply-To: <4AE74659.6020503@ramsay1.demon.co.uk>
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
next prev parent reply other threads:[~2009-11-03 7:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-27 19:13 [PATCH 3/4] Makefile: keep MSVC and Cygwin configuration separate Ramsay Jones
2009-11-03 7:27 ` Johannes Sixt [this message]
2009-11-04 19:29 ` Ramsay Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AEFDB6B.8010209@viscovery.net \
--to=j.sixt@viscovery.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mstormo@gmail.com \
--cc=ramsay@ramsay1.demon.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).