make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why SHELL defaults to sh.exe


From: Eli Zaretskii
Subject: Re: Why SHELL defaults to sh.exe
Date: Thu, 23 Jan 2020 16:33:07 +0200

> From: "Christian Jullien" <address@hidden>
> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]