Recognize shells reporting as MINGW under windows.
authorklebinger.andreas@gmx.at <klebinger.andreas@gmx.at>
Thu, 8 Feb 2018 00:09:55 +0000 (00:09 +0000)
committerTamar Christina <tamar@zhox.com>
Thu, 8 Feb 2018 00:11:05 +0000 (00:11 +0000)
Summary:
My msys instance at least reports MINGW instead of MSYS for uname.
This commit adjusts the regex to match either one.

Without this some errors occur because of missing .exe extensions in
file names.

This fixes #14654

Test Plan: make

Reviewers: O26 nofib, Phyx, bgamari

Reviewed By: Phyx, bgamari

Subscribers: bgamari, Phyx

GHC Trac Issues: #14654

Differential Revision: https://phabricator.haskell.org/D4297

mk/boilerplate.mk

index c2a5cd6..fa8b635 100644 (file)
@@ -23,7 +23,7 @@ CONTEXT_DIFF_RAW = diff -U 1
 EXECUTABLE_FILE = chmod +x
 
 # Windows MSYS specific settings
-ifeq ($(shell uname -s | grep -c MSYS), 1)
+ifeq ($(shell uname -s | grep -c 'MSYS\|MINGW'), 1)
        exeext=.exe
        CONTEXT_DIFF=$(CONTEXT_DIFF_RAW) --strip-trailing-cr
 else