cshell within make

Guy Harris guy at sun.uucp
Fri Jan 17 05:22:42 AEST 1986


> >Have your system manager recompile make: somewhere in the source is a
> >line that checks your environmental variable $SHELL.  For some reason
> >that line is usually commented out, even in BSD.
> 
> Once I had the "opposite" problem. I was using csh(1) as my login shell,
> but the Makefile I often used required use of sh(1). I added the variable
> definition
> 
> SHELL=/bin/sh
> 
> to the Makefile. This way, only the shell used by make(1) was affected,
> leaving the environment of my login shell alone.

Which is probably why the line in question was commented out in the 4.2BSD
"make".  Anybody know whether it was there in V7?  V7 didn't have a SHELL
environment variable, to my knowledge, so I presume it was added in 4.xBSD.

> This may be a different version of make(1) than on the Sun/BSD 4.2, though,
> being something of a SYSV Unix(tm) on a Convergent Technologies
> MegaFrame(tm).

The reason it's *not* commented out in the System V (and System III) "make",
I'm told by somebody from AT&T, is that it was intended for Korn shell
users.  The Korn shell, unlike the C shell, is a (either completely or
mostly) compatible superset of the Bourne shell, so it doesn't break
Makefiles the way using the C shell does.  (S3/S5 also has a SHELL
environment variable).

	Guy Harris



More information about the Comp.unix mailing list