Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Jan 2004 12:18:53 -0500
From:      Joe Marcus Clarke <marcus@marcuscom.com>
To:        Sergei Kolobov <sergei@freebsd.org>
Cc:        freebsd-ports <freebsd-ports@freebsd.org>
Subject:   Re: CONFIGURE_TARGET
Message-ID:  <1073668732.42838.12.camel@shumai.marcuscom.com>
In-Reply-To: <20040109170712.GE706@chetwood.ru>
References:  <20040109163220.GB5994@freepuppy.bellavista.cz> <20040109170712.GE706@chetwood.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-aXs2nwqQFgmifiFywfo+
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

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
> >=20
> >     CONFIGURE_TARGET?=3D	${MACHINE_ARCH}-portbld-freebsd${OSREL}
> >=20
> > but porters-handbook/makefile-build.html says
> >=20
> >     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=3Dyes li=
ne
> >     in your Makefile:
> >=20
> >     CONFIGURE_TARGET=3D--build=3D${MACHINE_ARCH}-portbld-freebsd${OSREL=
}
> >=20
> > now, couple of questions:
> >=20
> > * what is the first recent of version of autoconf to require --build=3D=
?
>=20
> 2.5x
> =20
> > * what is the percentage of ports that want --build=3D?  (IOW, wouldn't=
 it
> >   already make more sense to make that the default value in bsd.port.mk=
?
>=20
> I would venture to say that most of recently updated  ports require --bui=
ld.
>=20
> > * how about suggesting
> >=20
> >   CONFIGURE_TARGET:=3D--build=3D${CONFIGURE_TARGET}
>=20
> I have suggested another (but similar) approach:=20
> see ports/52917 (currently suspended).
>=20
> > * can't the value be decided automagically? e. g.
> >=20
> >   CONFIGURE_TARGET!=3D.../configure --help|grep -Fe --build...
>=20
> 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

>=20
> Sergei
>=20
> ______________________________________________________________________
> From: Sergei Kolobov <sergei@FreeBSD.org>
> To: Oliver Eikemeier <eikemeier@fillmore-labs.com>
> Cc: ports@FreeBSD.org
> Subject: Re: ports/59254: ports that write something after bsd.port.mk
> Date: Mon, 01 Dec 2003 18:08:03 +0300
>=20
> On 2003-11-16 at 00:37 +0100, Oliver Eikemeier wrote:
> > How about doing something like
> > cd ${CONFIGURE_WRKSRC} && ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} --vers=
ion=20
> > | sed -ne 's/.*autoconf version \([0-9.]*\).*/\1/p'
>=20
> I took slightly different approach:
>=20
> CONFIGURE_VERSION!=3D ${AWK} '/Generated by GNU Autoconf/ {print $$6;}' \
>                     ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
> .if ${CONFIGURE_VERSION} =3D=3D "2.13"=20
> CONFIGURE_TARGET?=3D ${MACHINE_ARCH}-portbld-freebsd${OSREL}
> else
> CONFIGURE_TARGET?=3D --build=3D${MACHINE_ARCH}-portbld-freebsd${OSREL}
> .endif
>=20
> Now, equivalent of this should be included in do-configure target,=20
> but I have difficult time figuring out how to rewrite it=20
> so it would do the awk call, etc.  only at the do-configure time,=20
> but not every time bsd.port.mk is sourced.=20
> Anyone?
>=20
> Sergei
--=20
PGP Key : http://www.marcuscom.com/pgp.asc

--=-aXs2nwqQFgmifiFywfo+
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQA//uJ8b2iPiv4Uz4cRAmjtAJ9aFi9GCxq/6o3QjE/aarF6SYP98gCghtV4
2OtVjgUTOfc7IWffpRzIkb4=
=VzGx
-----END PGP SIGNATURE-----

--=-aXs2nwqQFgmifiFywfo+--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1073668732.42838.12.camel>