]> git.ipfire.org Git - thirdparty/git.git/commitdiff
mingw: allow building with an MSYS2 runtime v3.x
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 8 Mar 2019 15:51:19 +0000 (07:51 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 11 Mar 2019 02:02:16 +0000 (11:02 +0900)
Recently the Git for Windows project started the upgrade process to
a MSYS2 runtime version based on Cygwin v3.x.

This has the very notable consequence that `$(uname -r)` no longer
reports a version starting with "2", but a version with "3".

That breaks our build, as df5218b4c30b (config.mak.uname: support MSys2,
2016-01-13) simply did not expect the version reported by `uname -r` to
depend on the underlying Cygwin version: it expected the reported
version to match the "2" in "MSYS2".

So let's invert that test case to test for *anything else* than a
version starting with "1" (for MSys). That should safeguard us for the
future, even if Cygwin ends up releasing versionsl like 314.272.65536.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.mak.uname

index b37fa8424c88cae23abf02f8276e8b4f6ffef19a..2011bac6d54ebb66544c94aa27453e2545a7a34a 100644 (file)
@@ -567,7 +567,7 @@ ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
        NO_GETTEXT = YesPlease
        COMPAT_CLFAGS += -D__USE_MINGW_ACCESS
 else
-       ifeq ($(shell expr "$(uname_R)" : '2\.'),2)
+       ifneq ($(shell expr "$(uname_R)" : '1\.'),2)
                # MSys2
                prefix = /usr/
                ifeq (MINGW32,$(MSYSTEM))