Shell spawning and environment problem on W2K

Fleischer, Karsten (K.) kfleisc1@ford.com
Wed Aug 2 02:52:00 GMT 2000


Default for SHELL is sh.exe, this should be the same as /bin/sh.

I just found out something interesting. First look at this makefile:

============
SHELL=/bin/sh
export TIME:=$(shell date)

target:
	@echo $(SHELL) $(TIME)
=============

This prints out "/bin/sh" and the current date and time.

Now look at this one (note the quotes around /bin/sh):

============
SHELL="/bin/sh"
export TIME:=$(shell date)

target:
	@echo $(SHELL) $(TIME)
=============

This one prints nonsense and fails with error 127, at least on my system.
Where is the difference? IMHO both makefiles should do the same.


-----Original Message-----
From: Heinz-Juergen Oertel [ mailto:oe@port.de ]
Sent: Mittwoch, 2. August 2000 10:40
To: Fleischer, Karsten (K.)
Cc: 'cygwin@sourceware.cygnus.com'
Subject: Re: Shell spawning and environment problem on W2K


"Fleischer, Karsten (K.)" wrote:
> 
> The lowercase $(shell ...) statement is a builtin GNU Make function and
has
> nothing to do with the $(SHELL) variable, expcept that the specified shell
> is used for command execution. My question is: why does command execution
> does not work properly when I specify /bin/sh explicitly?
> 
> Karsten
> 


can you see any difference in the used shell,
e.g. is /bin/sh
the same that is used without specifying SHELL ?



   Heinz

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list