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_li...@tx.rr.com> 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 > > .if ${PORT_OPTIONS:MBROCCOLI} > 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 bsd.port.mk (around line 3735) does it - it basically runs ${SETENV} ... ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} 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 on). And the same goes for the ${MAKE} invocation - take a look at the do-build target in bsd.port.mk (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. G'luck, Peter -- Peter Pentchev r...@ringlet.net r...@freebsd.org p.penc...@storpool.com PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13 What would this sentence be like if pi were 3?
signature.asc
Description: Digital signature