[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to become very unpopular. (or:) A scary story.



On Thu, Aug 16, 2001 at 10:53:31PM +0300, Richard Braakman wrote:
> On Thu, Aug 16, 2001 at 01:56:02PM -0400, Thomas Hood wrote:
> > 3. Add a space after "ROOTDIR=/"
> > 4. Release to unwary users
> 
> An easy way to prevent problems of this sort is to specify all directory
> variables without trailing slashes.  This makes using them more natural, too.
> Example:
> 
> > ROOTDIR=
> > LIBDIR=$(ROOTDIR)/usr/lib
> >
> > install:
> >       mkdir $(LIBDIR)/foo
> >       cp -p lib/foo* $(LIBDIR)/foo/
> >
> > uninstall:
> >       rm -rf $(LIBDIR)


also notice that this example will rm -rf /usr/lib ;-)

> 
> Notice that nothing catastrophic happens even if some of the variables
> are accidentally not set.  Also notice the trailing slash on $(LIBDIR)/foo/,
> which forces an error message when copying a single file to a directory
> that should exist but doesn't.

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgpAPq3kCDT9f.pgp
Description: PGP signature


Reply to: