Force mingw32-make to ignore sh

makefile, mingw, windows

Solution

Turns out, I found the solution by chance. I had read that mingw32-make is supposed to look at the SHELL environment variable ... but it doesn't! However, you can specify the option on the command line like so:

mingw32-make SHELL=cmd

This is not ideal, but the best I could come up with. For now, I will leave this question un-answered, in case someone comes with a better answer.

Problem

I noticed that, if sh.exe is present in the PATH, then mingw32-make will use it to launch commands. But if it is not, then it will use cmd.exe. The problem is that both application are .... completely incompatible, and there is no way to create makefiles to would work for both. Is there a way to ask mingw32-make to always use cmd.exe? Or to create an environment forcing mingw32-make to ignore this sh.exe?

Original source