[comp.unix.wizards] make and ${SHELL}

chris@mimsy.UUCP (Chris Torek) (09/17/88)

>In article <68616@sun.uucp> guy@gorodish.Sun.COM (Guy Harris) writes:
>>Yes, it was introduced in either the System III or the System V "make".  I'd
>>call it a "misfeature", not a "feature", since it breaks existing Makefiles
>>when run by users whose login shell isn't "/bin/sh".

In article <24946@ccicpg.UUCP> nick@ccicpg.UUCP (Nick Crossley) writes:
>I personally like this feature/misfeature, as it allows me to invoke ksh.

I believe you misinterpreted Guy.  The bug is that make *always imports*
SHELL from the environment, not that it runs `${SHELL} -c[e] command'
rather than `sh -c[e] command'.  There is nothing wrong with a Makefile
that says

	SHELL=ksh
	foo:
		... ksh commands ...

There *is* something wrong when a Makefile that reads, in its entirety,

	foo:
		echo cannot make foo in this configuration 2>&1

fails simply because the user's $SHELL environment variable is `menush'.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris@mimsy.umd.edu	Path:	uunet!mimsy!chris