Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!rutgers!sri-spam!mordor!lll-tis!ames!ucbcad!ucbvax!renoir.Berkeley.EDU!jwm
From: jwm@renoir.Berkeley.EDU (Jeff Mc Carrell)
Newsgroups: comp.unix.wizards
Subject: How to get $(HOME) in BSD4.3 Makefiles?
Message-ID: <19550@ucbvax.BERKELEY.EDU>
Date: Tue, 30-Jun-87 20:17:53 EDT
Article-I.D.: ucbvax.19550
Posted: Tue Jun 30 20:17:53 1987
Date-Received: Thu, 2-Jul-87 01:20:33 EDT
Expires: Thu, 30-Jul-87 03:00:00 EDT
Sender: usenet@ucbvax.BERKELEY.EDU
Reply-To: jwm@renoir.Berkeley.EDU (Jeff Mc Carrell)
Distribution: na
Lines: 29


    We run SunOS 3.x and BSD 4.3 around here and I have a number of
programs that I compile just for my bin.  I'd like to have an incantation
that is portable across these 2 systems that will expand to my home
directory.  Currently I use:

HDIR	      = $${HOME}

which expands to ${HOME} which when passed directly to the shell works
just fine.  This is fine for things like:

install:	$(PROGRAM)
		@install -c -s $(HDIR)/bin foo

but doesn't work in something like:

DEST	      = $(HDIR)/bin

install:	$(DEST)/$(PROGRAM)

because $(DEST) expands to $(HDIR)/bin expands to ${HOME}/bin and BSD
make doesn't know how to evaluate that.  SunOS make works fine because it
reads all of the environment variables, so ${HOME} is known.

Has anyone thought of a good solution for this problem?

						jeff
						jwm@renoir.Berkeley.EDU
						...!ucbvax!jwm