Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!seismo!mcvax!ukc!its63b!xsimon From: xsimon@its63b.UUCP Newsgroups: comp.bugs.sys5 Subject: Re: even more bugs in make Message-ID: <457@its63b.ed.ac.uk> Date: Wed, 3-Jun-87 08:16:44 EDT Article-I.D.: its63b.457 Posted: Wed Jun 3 08:16:44 1987 Date-Received: Sat, 6-Jun-87 06:27:00 EDT References: <2888@cit-vax.Caltech.Edu> Reply-To: xsimon@its63b.ed.ac.uk (Simon Brown) Distribution: world Organization: Computer Science Department, Edinburgh University Lines: 24 Keywords: IFS, shell script, make In article <2888@cit-vax.Caltech.Edu> fritz@polecat.Caltech.EDU (Fritz Nordby) writes: >I don't know if this has been noticed before, but there is a severe problem >with make and Bourne shell scripts. If the IFS environment variable is set >when make is invoked, then make resets IFS to an empty string. This almost >guarantees that Bourne shell scripts will die horribly. It's not that it resets it to an empty string explicitly - it's a side-effect of the way that Make sets up make-variables from the environment list. What it does is it parses each environ entry for =, and then just simulates an assignment (such as = inside a Makefile). Of course, it strips out any "whitespace" between the and the - which is very embarassing for variables such as IFS in which the whitespace is an important part of the . The same problem occurs for ANY variable which has an initial whitespace component - the whitespace will get stripped off by Make. -- ---------------------------------- | Simon Brown | UUCP: seismo!mcvax!ukc!{its63b,cstvax}!simon | Department of Computer Science | JANET: simon@uk.ac.ed.{its63b,cstvax} | University of Edinburgh, | ARPA: simon%{its63b,cstvax}.ed.ac.uk ... | Scotland, UK. | @cs.ucl.ac.uk ---------------------------------- "Life's like that, you know"