Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site uvacs.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!mcnc!ncsu!uvacs!rwl From: rwl@uvacs.UUCP Newsgroups: net.unix Subject: Re: cshell within make Message-ID: <100@uvacs.UUCP> Date: Fri, 17-Jan-86 16:03:22 EST Article-I.D.: uvacs.100 Posted: Fri Jan 17 16:03:22 1986 Date-Received: Sun, 19-Jan-86 05:46:27 EST References: <425@bcsaic.UUCP> Organization: U.Va. CS in Charlottesville VA Lines: 36 > I have several script files written in csh syntax that perform some tests on > files. I would like to invoke them from within 'make.' The problem is that > make insists on using Bourne shell...this despite the fact that the first line > in the script file is #/bin/csh, and it runs in csh fine when it is called > interactively. > : > Am I missing something? Is there a variable that can be set within the > Makefile to always use /bin/csh? Or an undocumented command line option? Yeah, you are missing something. The magic cookie that defines the interpreter the system should choose when executing a shell script is "#!"; these characters should be the first two bytes of the file. What you should say at the top of your script is #! /bin/csh not just #/bin/csh which would not be interpreted by the kernel as anything meaningful and would be interpreted as a comment in either sh(1) or csh(1). It's not that make(1) is insisting on using the Bourne shell to interpret the file, just that Unix will use sh(1) as the interpreter when it doesn't know what else to use. Unless you actually need your usual aliases within the script, I'd recommend using the form #! /bin/csh -f which will start up faster because it refrains from reading ~/.cshrc. -- Ray Lubinsky University of Virginia, Dept. of Computer Science uucp: decvax!mcnc!ncsu!uvacs!rwl