- To: Michael Lake <Mike.Lake@xxxxxxxxxx>
- Subject: Re: [SLUG] Using $HOME inside Makefile
- From: Ken Yap <ken@xxxxxxxxxx>
- Date: Mon Jul 24 14:16:51 2000
- Cc: Sydney Linux Users Group <slug@xxxxxxxxxxx>
- Reply-to: ken@xxxxxxxxxx (Ken Yap)
>Hi all,
>
>Can't seem to get this right. I have a Makefile with:
>
>install:
> cp backup $HOME/bin
> @echo 'Setting executable status...'
> chmod 750 $HOME/bin/backup
>
>I don't want to use /home/mikel/bin as then the Makefile is
>not generic.
>Whats the really simple stuff I have forgotten. (man make
>says nothing about using environment vars inside Makefile)
You have to escape the $ as $$ so that make doesn't try to expand it as
a make variable and it actually gets to the shell.