aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/win32/msys_tools/vc/mc.sh
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2015-09-28 12:34:53 +0200
committerDan Gudmundsson <[email protected]>2015-10-22 14:17:57 +0200
commit4a9f688b804688ff95e256d3412ca932b9972d8a (patch)
treee3691d22889979a0c5835ab5ca4ef0efb198f73f /erts/etc/win32/msys_tools/vc/mc.sh
parent1523be48ab4071b158412f4b06fe9c8d6ba3e73c (diff)
downloadotp-4a9f688b804688ff95e256d3412ca932b9972d8a.tar.gz
otp-4a9f688b804688ff95e256d3412ca932b9972d8a.tar.bz2
otp-4a9f688b804688ff95e256d3412ca932b9972d8a.zip
erts: Detect and build on MSYS2 for windows
Allow building win32 on MSYS2. Avoid msys2 path conversion which does not work. And print the real windows command when something fails.
Diffstat (limited to 'erts/etc/win32/msys_tools/vc/mc.sh')
-rw-r--r--erts/etc/win32/msys_tools/vc/mc.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/erts/etc/win32/msys_tools/vc/mc.sh b/erts/etc/win32/msys_tools/vc/mc.sh
index e9ea9ff9a9..14b5ebaa8f 100644
--- a/erts/etc/win32/msys_tools/vc/mc.sh
+++ b/erts/etc/win32/msys_tools/vc/mc.sh
@@ -80,9 +80,14 @@ if [ -n "$OUTPUT_DIRNAME" ]; then
exit $RES
fi
fi
+# MSYS2 (currently) converts the paths wrong, avoid it
+export MSYS2_ARG_CONV_EXCL=
eval $MCC "$CMD" >/tmp/mc.exe.${p}.1 2>/tmp/mc.exe.${p}.2
RES=$?
-tail +2 /tmp/mc.exe.${p}.2 >&2
+if [ $RES != 0 ]; then
+ echo Failed: $MCC "$CMD"
+fi
+tail -n +2 /tmp/mc.exe.${p}.2 >&2
cat /tmp/mc.exe.${p}.1
rm -f /tmp/mc.exe.${p}.2 /tmp/mc.exe.${p}.1
exit $RES