CONFIGURE_TARGET
Joe Marcus Clarke
marcus at marcuscom.com
Fri Jan 9 09:19:54 PST 2004
On Fri, 2004-01-09 at 12:07, Sergei Kolobov wrote:
> On 2004-01-09 at 17:32 +0100, Roman Neuhauser wrote:
> > bsd.port.mk defines
> >
> > CONFIGURE_TARGET?= ${MACHINE_ARCH}-portbld-freebsd${OSREL}
> >
> > but porters-handbook/makefile-build.html says
> >
> > Note: If your package uses GNU configure, and the resulting
> > executable file has a ``strange'' name like
> > i386-portbld-freebsd4.7-appname, you will need to additionally
> > override the CONFIGURE_TARGET variable to specify the target in the
> > way required by scripts generated by recent versions of autoconf.
> > Add the following line immediately after the GNU_CONFIGURE=yes line
> > in your Makefile:
> >
> > CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
> >
> > now, couple of questions:
> >
> > * what is the first recent of version of autoconf to require --build=?
>
> 2.5x
>
> > * what is the percentage of ports that want --build=? (IOW, wouldn't it
> > already make more sense to make that the default value in bsd.port.mk?
>
> I would venture to say that most of recently updated ports require --build.
>
> > * how about suggesting
> >
> > CONFIGURE_TARGET:=--build=${CONFIGURE_TARGET}
>
> I have suggested another (but similar) approach:
> see ports/52917 (currently suspended).
>
> > * can't the value be decided automagically? e. g.
> >
> > CONFIGURE_TARGET!=.../configure --help|grep -Fe --build...
>
> I have suggested something like that in a thread on this list
> on 2003-12-01 (attached). I haven't received any response. :(
You might want to look at PKG_ARGS and $${_LATE_PKG_ARGS}. Then go
down, and look at do-package. We used late expansion there so we could
evaluate certain variables in an executable target. The same could be
done with CONFIGURE_TARGET, I think.
If you get something working by early next week, we can test it in the
next 4-exp build on bento.
Joe
>
> Sergei
>
> ______________________________________________________________________
> From: Sergei Kolobov <sergei at FreeBSD.org>
> To: Oliver Eikemeier <eikemeier at fillmore-labs.com>
> Cc: ports at FreeBSD.org
> Subject: Re: ports/59254: ports that write something after bsd.port.mk
> Date: Mon, 01 Dec 2003 18:08:03 +0300
>
> On 2003-11-16 at 00:37 +0100, Oliver Eikemeier wrote:
> > How about doing something like
> > cd ${CONFIGURE_WRKSRC} && ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} --version
> > | sed -ne 's/.*autoconf version \([0-9.]*\).*/\1/p'
>
> I took slightly different approach:
>
> CONFIGURE_VERSION!= ${AWK} '/Generated by GNU Autoconf/ {print $$6;}' \
> ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
> .if ${CONFIGURE_VERSION} == "2.13"
> CONFIGURE_TARGET?= ${MACHINE_ARCH}-portbld-freebsd${OSREL}
> else
> CONFIGURE_TARGET?= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
> .endif
>
> Now, equivalent of this should be included in do-configure target,
> but I have difficult time figuring out how to rewrite it
> so it would do the awk call, etc. only at the do-configure time,
> but not every time bsd.port.mk is sourced.
> Anyone?
>
> Sergei
--
PGP Key : http://www.marcuscom.com/pgp.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20040109/64583357/attachment.bin
More information about the freebsd-ports
mailing list