fix: support MSYS2 builds on gmake

uname -s under MSYS2 never reports Windows_NT, so gmake.mk's
Windows_NT checks could silently fall through to the Linux path.
Detect MINGW/MSYS/UCRT/CLANG/CYGWIN uname prefixes in build.sh
and gmake.mk, separating "building for Windows" (binary names,
libs) from "running under cmd.exe" (mkdir/rd vs mkdir -p/rm -rf) —
MSYS2 keeps the posix shell builtins even when targeting Windows.
Mirrors the same fix already applied to stk.
This commit is contained in:
anth64 committed 2026-11-10 07:40:58 +01:00
1 parent 26d08228a7
commit e143adca2b
2 files changed
+27 -8

No files matched your search

+4 -1
View File
@@ -1,6 +1,9 @@
#!/bin/sh
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
UNAME_S=$(uname -s)
export UNAME_S
OS=$(echo "$UNAME_S" | tr '[:upper:]' '[:lower:]')
if [ "$OS" = "freebsd" ]; then
MK_FILE="bmake.mk"