Makefile question

Johnny Lam jlam at
Mon Jun 13 17:57:56 GMT 2005

Kövesdán Gábor wrote:
> I'm trying to make a new port, but the software I'm porting has an 
> awkward configure script, and when I run ./configure --prefix=/usr/local 
> then every file goes to directly to /usr/local not to /usr/local/bin, 
> /usr/local/etc, ...
> Thus I would like to install it into /usr/local/appname.
> I wrote to my Makefile:
> CONFIGURE_ARGS= --prefix=${PREFIX}/appname
> But the situation is the same. Everything goes directly to /usr/local, 
> as if I wrote just --prefix=${PREFIX}.

Line 2624 of ports/Mk/ always adds --prefix=${PREFIX} to 
CONFIGURE_ARGS, and I think GNU configure scripts have the last option 
taking precedence, meaning it overrides whatever you're setting in the 
port Makefile.  I don't know what the right thing to do is.  Maybe you 
can add your special CONFIGURE_ARGS setting after is 
included?  In NetBSD pkgsrc, we created a new variable to solve this 
problem -- GNU_CONFIGURE_PREFIX which defaults to ${PREFIX}, but can be 
set to something else by the user.


	-- Johnny Lam <jlam at>

More information about the freebsd-ports mailing list