Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Feb 2005 11:37:00 +0200
From:      Ruslan Ermilov <ru@freebsd.org>
To:        John-Mark Gurney <gurney_j@resnet.uoregon.edu>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: buildenv target
Message-ID:  <20050213093700.GF88292@ip.net.ua>
In-Reply-To: <21203.1108255197@critter.freebsd.dk>
References:  <20050213001752.GA40468@funkthat.com> <21203.1108255197@critter.freebsd.dk>

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

--Il7n/DHsA0sMLmDu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi John-Mark,

On Sun, Feb 13, 2005 at 01:39:57AM +0100, Poul-Henning Kamp wrote:
> In message <20050213001752.GA40468@funkthat.com>, John-Mark Gurney writes:
> >Does anyone object to adding a buildenv target to our Makefile, so that
> >when crossbuilding you can get the tools setup in a shell.  Useful for
> >doing crossbuild testing w/ a cross-built world eaiser.
> >
> >http://people.freebsd.org/~jmg/buildenv.patch
> >
> >so:
> >bash-2.05b$ which config
> >/usr/sbin/config
> >bash-2.05b$ make buildenv TARGET_ARCH=3Darm
> >Entering world for arm:arm
> >bash-2.05b$ which config
> >/usr/obj/arm/usr/home/jmg/arm/src/i386/legacy/usr/sbin/config
>=20
> Sounds like a good addition.
>=20
I missed the original post, so replying here.  I very much like
and support the idea.  About the implementation, for the standard
case of root doing this, the standard ~root/.cshrc unfortunately
resets PATH, making this useless pretty useless.  So I suggest
to use "sh" here.  Another minor buglet is that the output for
pc98 will be mangled, "pc98:i386".  Here's my version, simplified
and fixed:

%%%
Index: Makefile.inc1
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/ncvs/src/Makefile.inc1,v
retrieving revision 1.473
diff -u -p -r1.473 Makefile.inc1
--- Makefile.inc1	20 Jan 2005 10:49:02 -0000	1.473
+++ Makefile.inc1	13 Feb 2005 01:20:00 -0000
@@ -457,6 +457,10 @@ WMAKE_TGTS+=3D	build32
 buildworld: ${WMAKE_TGTS}
 .ORDER: ${WMAKE_TGTS}
=20
+buildenv:
+	@echo Entering world for ${TARGET_ARCH}:${TARGET}
+	@${WMAKEENV} sh || true
+
 TOOLCHAIN_TGTS=3D	${WMAKE_TGTS:N_depend:Neverything}
 toolchain: ${TOOLCHAIN_TGTS}
 kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_libraries}
%%%


Cheers,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--Il7n/DHsA0sMLmDu
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFCDx+8qRfpzJluFF4RAmMGAJsExWcD92eiCnNnDYb8/x2/p9VFZACbBNLp
Mr/BoNDPj7o87b1CP7VkJME=
=wm1p
-----END PGP SIGNATURE-----

--Il7n/DHsA0sMLmDu--



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