Make & .cshrc

Guy Harris guy at gorodish.Sun.COM
Fri Sep 16 08:59:04 AEST 1988


> Perhaps this ("make" using the "make" variable SHELL to specify which
> shell to use - gh) is a system V make(1) feature?

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".

The reason why the environment variable SHELL affects the shell "make" uses is
that the S3/S5 "make" imports environment variables and turns them into "make"
variables.

(If anyone cares to make the argument "The versions of UNIX AT&T ships only
comes with one shell; why should they have worried about BSD's C shell?", I
note that S5 has - and, I think, S3 had - the SHELL environment variable and,
like every other reasonably sane version of UNIX, those versions let users have
shells other than "/bin/sh", so this argument is not valid.  It's not a BSD vs.
S5 issue, or even a Bourne shell vs.  C shell issue; those just happen to be
the most obvious places where it could break things.

Making things work only if SHELL is the Bourne shell or a look-alike is often
the wrong thing to do; nevertheless, S3/S5 did it anyway - *vide* the stuff
that's done in "/etc/profile", such as setting TZ.  "/etc/profile" is not
sourced if your shell isn't a Bourne shell look-alike; this not only screws C
shell users, but UUCP accounts as well.)

We took this misfeature out of the S5 "make", either when we added it (in SunOS
3.0, if I remember correctly) or some time after that; we did so precisely
because it *did* break existing Makefiles.



More information about the Comp.unix.wizards mailing list