How to descend into the extract to build in a subdir

Peter Pentchev roam at
Thu Nov 29 09:43:49 UTC 2012

On Tue, Nov 27, 2012 at 02:45:54PM -0600, Paul Schmehl wrote:
> --On November 27, 2012 2:24:12 PM -0600 Paul Schmehl
> <pschmehl_lists at> wrote:
> >I'm working on a port that requires a separate ./configure and ./make to
> >build libraries before you build the main source.  How is this done in
> >ports?
> >
> >I figure you have to do something in pre-build:, but I'm not sure exactly
> >what.
> >(cd ${WRKSRC}/subdir && ${MAKE}) causes make to fail entirely.  I'm
> >having trouble finding a comparable example in ports and there doesn't
> >seem to be anything about it in the porters handbook (that I have found.)
> Never mind.  I figured it outl
> pre-configure:
>        (cd ${WRKSRC}/aux/broccoli && ./configure)
> pre-build:
>        (cd ${WRKSRC}/aux/broccoli && ${MAKE})
> .endif

I know I'm a bit late to this party, but still - if this is a GNU
configure script, you might want to pass a couple more options to it.
Take a look at how (around line 3735) does it - it basically
with a couple more environment variables defined (compiler, linker,
paths, etc).  If your port does not do at least something similar to
this, it might end up compiling different parts of the source with
different settings (e.g. CC, CFLAGS, CPPFLAGS for -D... and -I... and so

And the same goes for the ${MAKE} invocation - take a look at the
do-build target in (just a couple of lines below the
configure one) - at least ${SETENV} ${MAKE_ENV} ${MAKE}, if not a couple
more MAKE_FLAGS and MAKE_ARGS, maybe MAKE_JOBS for parallel building.


Peter Pentchev	roam at roam at p.penchev at
PGP key:
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13
What would this sentence be like if pi were 3?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <>

More information about the freebsd-ports mailing list