Subject: Re: running make from wrksrc?
To: Rasputin <rasputin@idoru.mine.nu>
From: Quentin Garnier <netbsd@quatriemek.com>
List: tech-pkg
Date: 06/14/2003 06:07:13
Le Sat, 14 Jun 2003 00:32:03 +0100
Rasputin a ecrit :
> * Jeremy C. Reed <reed@reedmedia.net> [0609 00:09]:
> > On Fri, 13 Jun 2003, Rasputin wrote:
> > 
> > > do-install:
> > > 	make install prefix=${PREFIX}
> > >
> > > causes an infinite loop. How can I cd to WRKSRC before running
> > > make?
> > 
> > Use "cd" :)
> > 
> > cd ${WRKSRC} && ${MAKE} install prefix=${PREFIX}
> 
> Do you know, I could've sworn I'd tried that and it complained that
> 'cd' command not found. And now it works. Think I'll go to bed
> before I break something important :)

If you leave 'cd' on its own line, make will complain, this it will try to
exec it directly.

But if make sees '&&' or '||' in the command line, it will invoke /bin/sh
on it.

make doesn't have a 'current directory' that can change inside a target
scope (it would need its own interpreter for && || and whatever syntax sh
understands), that's whay you need the '&&' trick.

FWIW, I'd try 'MAKE_ENV+= prefix=${PREFIX}' for your issue.

-- 
Quentin Garnier - cube@cubidou.net
"Feels like I'm fiddling while Rome is burning down.
Should I lay my fiddle down and take a rifle from the ground ?"
Leigh Nash/Sixpence None The Richer, Paralyzed, Divine Discontents, 2002.