Date: Mon, 28 Apr 2014 18:57:52 -0600 From: Ian Lepore <ian@FreeBSD.org> To: Warner Losh <imp@bsdimp.com> Cc: FreeBSD Current <current@FreeBSD.org> Subject: Re: Make variables to force non default libraries and includes? Message-ID: <1398733072.61646.251.camel@revolution.hippie.lan> In-Reply-To: <80F941B9-3A54-4059-BF99-A5F59A9731DA@gmail.com> References: <535E07C9.5060309@freebsd.org> <80F941B9-3A54-4059-BF99-A5F59A9731DA@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2014-04-28 at 18:36 -0600, Warner Losh wrote: > On Apr 28, 2014, at 1:48 AM, Julian Elischer <julian@FreeBSD.org> wrote= : >=20 > > I need to do the equivalent of "cd /usr/src/cddl/usr.sbin/dtrace; ma= ke DESTDIR=3D/mumble all install=94 >=20 > cd /usr/src > make distributeworld DESTDIR=3D/mumble > cd cddl/usr.sbin/dtrace > make buildenv > make all install >=20 > > but it pulls in libraries from the base system, which differ slightly= from those in the source tree. >=20 > The above will create the right /mumble hierarchy, and will pull the li= braries from the build rather than the local system. >=20 > > How can I force it to use /mumble2/include and /mumble2/lib instead o= f / ? > >=20 > > I can pre-populate /mumble2 using "make buildworld", "make libraries"= , and "make includes" but > > I need to be able to do selective builds of just subdirectories after= that.. I haven't spotted the right way of forcing the use of the "--sys= tem_root /mumble2" option in the compiles. > >=20 > > I know we do it in 'buildworld' is there a more generic way? > >=20 > > I have been looking in the .mk files but I haven't spotted it so far. >=20 > You=92re asking for some serious split-brain action. chroot builds are = likely your best option. There=92s no easy way to force this, although yo= u might get some milage out of WMAKEENV options, but I think we bake most= of the where to look for things options into the binaries. One crazy opt= ion would be to set CC=3D=93cc =97sysroot /mumble=94 but I=92m sure there= be dragons there=85 >=20 > Good luck with this crazy, never have we supported it very well, option= :) >=20 > Warner Actually the hooks are in place to do this stuff. Instead of make buildenv to get an interactive shell you can do something like BLDENV=3D`${MAKE} buildenvvars` chroot buildchroot/ "env -i $${BLDENV} cd /usr/src/somewhere && \ make all install"=20 -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1398733072.61646.251.camel>