make and ${SHELL} (was Re: Make & .cshrc)

Chris Torek chris at mimsy.UUCP
Sat Sep 17 21:48:07 AEST 1988


>In article <68616 at sun.uucp> guy at 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 at ccicpg.UUCP> nick at 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 at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.wizards mailing list