From 98a14ed36fcbb8faaad6c5706d54f7c84754217c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 4 Dec 2025 23:48:24 +0200 Subject: [PATCH] test: Support mingw32-make running with a proper sh.exe --- test/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/Makefile b/test/Makefile index 0b391bf..5d8be61 100644 --- a/test/Makefile +++ b/test/Makefile @@ -20,10 +20,15 @@ vpath %.idl $(SRC_PATH) vpath %.rc $(SRC_PATH) ifneq ($(filter %-mingw32, $(MAKE_HOST)),) - # If we're running as mingw32-make, we're executing everything in - # cmd.exe, so adapt/filter out things that require a POSIX shell. - CMD = 1 NATIVE = 1 +endif + +ifeq ($(wildcard $(SHELL)),) + # If $(SHELL) doesn't point at an existing file, we're running as + # mingw32-make with no sh.exe found, and using cmd.exe as shell. + # Thus adapt/filter out things that require a POSIX shell, and use + # cmd.exe builtins. + CMD = 1 TOUCH_TARGET = RM_F = del else