Bug in 'make install' causing /usr/local/lib/* to be erased?

Howdy,

I'm using linux 2.2.3, bash 2.01.0(1), as root, SDL 0.9.12
Perhaps I shouldn't be running as root, I don't know.

Here's the problem:

if SDL/lib is empty, (has no files in it)
and i perform these commands:

prompt# cd SDL
prompt# make install
sh bin_dist/install-sdl.sh
Enter installation directory: [/usr/local]
SDL library files will be installed in
	/usr/local/lib
SDL header files will be installed in
	/usr/local/include/SDL

Is that okay?  [Y/n]
lib/* -> /usr/local/lib/*
rm: /usr/local/lib/djvu: is a directory
rm: /usr/local/lib/mgetty+sendfax: is a directory
rm: /usr/local/lib/python1.5: is a directory
	(etc etc, one for each dir i have in /usr/local/lib)
cp: lib/*: No such file or directory
cp: /usr/local/lib/djvu: omitting directory
cp: /usr/local/lib/mgetty+sendfax: omitting directory
cp: /usr/local/lib/python1.5: omitting directory
	(etc etc, one for each dir i have in /usr/local/lib)
make: *** [install] Error 1

prompt# cd /usr/local/lib
prompt# ls

   lo and behold, all my files are gone.

This of course prevents anything that used those files
from loading with cute 'error in loading shared library' messages.


As near as I can tell it's happening in
	SDL/bin_dist/install-sdl.sh

line 121 is this: 
	echo_cp lib/* $lib_dir

in 'echo_cp' there is a bunch of messing with 
its arguments, and then line 93 has this:

	rm -f $dest/$file

since $dest/$file is left as "/usr/local/lib/*" rm -f
happily deletes everything in the directory.

I don't know enough to fix this, do you think this is a bug?

since $dest/$file is left as “/usr/local/lib/*” rm -f
happily deletes everything in the directory.

I don’t know enough to fix this, do you think this is a bug?

This is a serious problem. I will fix it ASAP.

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/

Thanks for fixing this bug! I saw the patch in the new CVS update.
l8r.On Fri, 16 Apr 1999, Sam Lantinga wrote:

since $dest/$file is left as "/usr/local/lib/*" rm -f
happily deletes everything in the directory.
I don't know enough to fix this, do you think this is a bug?

This is a serious problem. I will fix it ASAP.

-Sam Lantinga (slouken at devolution.com)