> From: "Christian Jullien" <[email protected]> > Date: Thu, 23 Jan 2020 11:27:53 +0100 > > I wonder why Windows native gnumake.exe defaults to sh.exe ?
Historical reasons. > Building gnumake.exe with build_w32.bat (which defaults to cl.exe) still uses > sh.exe while IMHO it should > default to cmd.exe It only defaults to sh.exe if it finds one on PATH. If you are using native Windows tools, why would you have sh.exe on PATH? there are no known good native Windows ports of any Unixy shell, AFAIK, only broken ones. If you don't have sh.exe on PATH, GNU Make on Windows will use cmd.exe. > In an ideal world, I should be able to get for example all .c source files > with: > > > > FILES = $(shell dir /b *.c) In GNU Make, you have the $wildcard function instead, so no need to use the shell in this case.
