Path: utzoo!attcan!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!cs.utexas.edu!rutgers!att!whuts!homxb!hropus!ki4pv!tanner From: tanner@ki4pv.uucp (Dr. T. Andrews) Newsgroups: comp.unix.wizards Subject: Re: make importing SHELL Message-ID: <7046@ki4pv.uucp> Date: 1 Oct 88 14:08:31 GMT References: <452@alice.marlow.uucp> <67870@sun.uucp> <67925@sun.uucp> <4147@bsu-cs.UUCP> Organization: CompuData Inc., DeLand Lines: 26 In article <4147@bsu-cs.UUCP>, dhesi@bsu-cs.UUCP (Rahul Dhesi) writes: ) I think the problem is that $SHELL exists at all. It's a poor ) substitute for the #! in 4.3BSD. The "#!" mechanism and the $SHELL mechanism address different issues. One is not a substitute for the other. The first tells the exec(2) family what interpreter should be used on a "program", since it is not executable. This causes, eg, "csh" scripts to be run with "csh". The second is used by certain applications which wish to spawn a user shell. A common case is the "ex" family of editors, which have a "sh" command to give you a sub-shell without losing your editing session. Neither of these mechanisms is suitable for determining how commands should be interepreted in a "Makefile". It might be clever to start a Makefile with the line "#! /bin/make SHELL=/bin/sh", and make the Makefile executable, so that you said "Makefile" instead of "make". The mistake of importing $SHELL for Makefiles has been made already, so the clever writer will probably try to include a "SHELL=" line, not because it is a good thing, but simply for safety. -- ...!bikini.cis.ufl.edu!ki4pv!tanner ...!bpa!cdin-1!cdis-1!ki4pv!tanner or... {allegra killer gatech!uflorida decvax!ucf-cs}!ki4pv!tanner