[comp.unix.wizards] Make is Buggy

simon@its63b.UUCP (02/15/87)

In article <13252@sun.uucp> guy@sun.UUCP (Guy Harris) writes:
>Furthermore, it is a botch to *import* SHELL from the environment;
>this causes Makefiles to work differently for people with different
>login shells!  "make" should NOT import SHELL.

And it *certainly* should not attempt to import things like IFS!
This can lead to extremely confusing bugs in complicated makefiles.
The problem is that it strips out initial blank-space when assigning
a make-variable (even from an environ-string), so IFS=" \t\n" gets
changed to IFS="" (double-quotes inserted here by me for clarity), which
can cause shell-scripts executed as subprocesses by make to go totally
haywire!

	Simon.

--------------------
Simon Brown
Department of Computer Science
University of Edinburgh
Scotland, UK.
--------------------
"Life is like that, you know"	 [anon.]

rlk@bacchus.UUCP (02/16/87)

In article <263@its63b.ed.ac.uk> simon@its63b.ed.ac.uk writes:
]
]In article <13252@sun.uucp> guy@sun.UUCP (Guy Harris) writes:
]>Furthermore, it is a botch to *import* SHELL from the environment;
]>this causes Makefiles to work differently for people with different
]>login shells!  "make" should NOT import SHELL.
]
]And it *certainly* should not attempt to import things like IFS!
]This can lead to extremely confusing bugs in complicated makefiles.
]The problem is that it strips out initial blank-space when assigning
]a make-variable (even from an environ-string), so IFS=" \t\n" gets
]changed to IFS="" (double-quotes inserted here by me for clarity), which
]can cause shell-scripts executed as subprocesses by make to go totally
]haywire!

It's bad enough that make imports PATH.  I was building something from
the source, and a couple of subdirectories failed.  Turned out it was
because the line in the makefile used a program in the working
directory, not prefixing it with ./ .  Since I don't have . in my path
for various reasons, the make blew out.

Of course, this is still better than some of the other things that
could have happened...but it was still messy.

Robert^Z

rbj@icst-cmr.arpa (02/20/87)

   ]>Furthermore, it is a botch to *import* SHELL from the environment;
   ]>this causes Makefiles to work differently for people with different
   ]>login shells!  "make" should NOT import SHELL.
   ]
   ]And it *certainly* should not attempt to import things like IFS!

Well, John Mashey once suggested asking `why' before flaming, and since
someone brought it up, *** why does IFS even exist *** ?

   ]This can lead to extremely confusing bugs in complicated makefiles.

Or any other corner of reality.

	(Root Boy) Jim "Just Say Yes" Cottrell	<rbj@icst-cmr.arpa>
	Help! A 900 foot tall vision of Dennis Ritchie told me
	that if I don't get my 4.3 BSD tapes by March I'll die!