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 21:26:19 +0200

> From: "Christian Jullien" <address@hidden>
> Date: Thu, 23 Jan 2020 20:18:17 +0100
> 
> Hum I see! It only a problem if I want to execute something if a sh.exe
> exists.
> 
> search:
> ifeq ($(SHELL),sh.exe)
>       grep something file
> else
>       find "something" file
> endif

If you want to depend on the value of $(SHELL), set it explicitly in
the Makefile.

In any case, the above logic is flawed, because 'grep' can be
available on Windows as well (I certainly have it here), and 'find'
could actually invoke a ported GNU 'find'.  IME, it is much better to
have Make variables for such commands, and let users set them from the
Make command line.



reply via email to

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