sh.exe: Command not found

Mumit Khan khan@NanoTech.Wisc.EDU
Wed Feb 21 20:08:00 GMT 2001


On Wed, 21 Feb 2001, Christopher Faylor wrote:

> Well, you have both renamed it and moved it to a nonstandard location.
> I wonder if that is your problem.  Usually sh.exe is expected to be in
> the standard /bin location.  Does /bin/sh.exe exist?

Actually, Cygwin port of GNU make uses sh.exe as the default SHELL variable 
unlike the other Unix ports' /bin/sh. Which means that if sh.exe is not in
the PATH, then it won't work. Of course, the solution is trivial:
  
  $ make SHELL=/path/to/sh.exe ...

Try the following to check:

  $ cat foo.mak
  all:
	@echo "SHELL = $(SHELL)"
	@$(SHELL) -c "echo SHELLOPTS = $$SHELLOPTS"
  
  $ make -f foo.mak
  SHELL = sh.exe
  sh.exe -c "echo SHELLOPTS = $SHELLOPTS"
  SHELLOPTS =

  $ make SHELL=bash -f foo.mak
  SHELL = bash
  bash -c "echo SHELLOPTS = $SHELLOPTS"
  SHELLOPTS = braceexpand:hashall:interactive-comments

Remember running into this issue before Cygwin adopted the current (and
sane!) layout..

Regards,
Mumit



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list