On Mon, Jul 24, 2000 at 02:10:56PM +1000, Michael Lake wrote:

>         cp backup $HOME/bin
>         @echo 'Setting executable status...'
>         chmod 750 $HOME/bin/backup
> 
> make install is trying to do this:
> cp backup OME/bin

Change $HOME to $(HOME) or $$HOME

$(var) is the syntax for referring to make variables (or $x for single
letter or symbol variables).  The variable is expanded by make before
passing it to the shell.  make interprets $HOME as $(H)OME, and since $H
has no value, the result is "OME".  You don't have to explicitly set
$(HOME) in your makefile.  make inherits some variables from the
environment, $(HOME) is one of these.

"$$" escapes the '$' and prevents make from expanding the variable.  make
passes a single '$' to the shell.  So "$$HOME" becomes "$HOME".  The shell
then expands the variable.


Cheers,

John
-- 
whois [EMAIL PROTECTED]


--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to