New port with USES=gmake will not stage

Shane Ambler FreeBSD at ShaneWare.Biz
Fri Jun 12 03:30:24 UTC 2015

On 11/06/2015 15:03, Euan Thoms wrote:
> On Thursday, June 11, 2015 13:18 SGT, "Chris H" <bsd-lists at> wrote:
>> On Thu, 11 Jun 2015 11:33:03 +0800 "Euan Thoms" <euan at> wrote
>>> I'm making a port for OpenSIPS. It builds successfully, but the even with
>>> just "make" it installs files to the system instead of to stage (i.e. to
>>> /usr/local/... instead of /usr/ports/net/opensips/work/stage/usr/local/...).
>>> I am using gmake and gcc since that's what's required for OpenSIPS.
>>> I've done a similar port before and the FreeBSD ports macros do the staging
>>> for me. However, even when I tell gmake the DESTDIR=${STAGEDIR} in do-build
>>> and do-install, a "make" just installs the files to /usr/local/... .

> MAKE_ARGS+=             exclude_modules="${EXCLUDE_MODULES}" include_modules="${INCLUDE_MODULES}"

While MAKE_ARGS should send options to gmake, what about backing up a
step to configure?

Try setting PREFIX in CONFIGURE_ENV or maybe MAKE_ENV to specify
environment variables instead of arguments.


Do you need USE_AUTOTOOLS=autoconf or to add a custom do-configure: ?

> #do-build:
> #       cd ${WRKSRC} && ${GMAKE} ${MAKE_ARGS} ${ALL_TARGET}
> #
> #do-install:
> #       cd ${WRKSRC} && ${GMAKE} ${MAKE_ARGS} ${INSTALL_TARGET}
> .include <>
> #### EOF ############
> I can't find the make files for stage to drill down and see what's going wrong. Any pointers to the script that "make stage" uses?
FreeBSD - the place to B...Software Developing

Shane Ambler

More information about the freebsd-ports mailing list