[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 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.

> LIBDIR=$(ROOTDIR)/usr/lib
> install:
>       mkdir $(LIBDIR)/foo
>       cp -p lib/foo* $(LIBDIR)/foo/
> uninstall:
>       rm -rf $(LIBDIR)

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.

Richard Braakman
Will write free software for money.
See http://www.xs4all.nl/~dark/resume.html

Reply to: