Path: utzoo!attcan!uunet!samsung!usc!elroy.jpl.nasa.gov!ames!sgi!shinobu!odin!rwb.esd.sgi.com!blean From: blean@rwb.esd.sgi.com (Bob Blean) Newsgroups: comp.sys.sgi Subject: Re: Make problems Message-ID: <5353@odin.SGI.COM> Date: 16 Mar 90 19:08:16 GMT References: <9003051914.AA28827@blumiris.chem.umr.edu> Sender: news@odin.SGI.COM Reply-To: blean@rwb.esd.sgi.com (Bob Blean) Organization: Silicon Graphics Inc. Lines: 48 In article <9003051914.AA28827@blumiris.chem.umr.edu>, bobf@BLUMIRIS.CHEM.UMR.EDU ("Robert B. Funchess") writes: > I finally figured out what was causing the Make problems, by comparing a > Makefile from ~4Dgifts with the problem one. Apparently on some systems it > is NOT necessary to explicitly specify SHELL=/bin/sh, that being taken as a > given. Irix *seems* to require this, or at least it generally works if I > include it. Unless of course I need the BSD-flavor install. The real > problem is that there are (at least) two main kinds of unix and whatever it > is that you need was written for the other one, no matter which one it is that > you have. > -- > < Bob | bobf | Funchess > > > Stay alert! Trust no one! Keep your laser handy! This is not really an Irix matter. This is a difference between BSD make and System V make. In System V, "make" uses the SHELL variable to decide how to interpret the commands in the makefile. BSD: according to the man page on a DECstation 3100 (Ultrix): When invoked as make or /bin/make, the environment variable SHELL is ignored and /bin/sh is always used as the command interpreter. In System V make, which Irix has, the man page says: Command lines are executed one at a time, each by its own shell. The SHELL environment variable can be used to specify which shell make should use to execute commands. The default is /bin/sh. Since the environment variable SHELL is generally set to be your interactive shell, you need to arrange to have it reset if the makefile is written for another shell. Or, assuming you don't run "make -e", you can set SHELL in the makefile as the /usr/people/4Dgifts/Makefile does. (Note that it is common to use csh as your interactive shell, and so to have the environment variable $SHELL set to /bin/csh, but to have a Makefile written for Bourne shell.) One way for csh users to do this is with an alias: alias make '(setenv SHELL /bin/sh; exec make \!*)'