> From: "Christian Jullien" <[email protected]> > 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.
