From owner-freebsd-current@FreeBSD.ORG Tue Apr 29 13:04:15 2014 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A51959D1; Tue, 29 Apr 2014 13:04:15 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7536E120; Tue, 29 Apr 2014 13:04:15 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Wf7hm-0004wn-62; Tue, 29 Apr 2014 13:04:14 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s3TD4B62016272; Tue, 29 Apr 2014 07:04:11 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/wcuY8HQTyR4oabTcZ8iAp Subject: Re: Make variables to force non default libraries and includes? From: Ian Lepore To: Julian Elischer In-Reply-To: <535F3938.9060809@freebsd.org> References: <535E07C9.5060309@freebsd.org> <80F941B9-3A54-4059-BF99-A5F59A9731DA@gmail.com> <1398733072.61646.251.camel@revolution.hippie.lan> <535F3938.9060809@freebsd.org> Content-Type: text/plain; charset="windows-1251" Date: Tue, 29 Apr 2014 07:04:11 -0600 Message-ID: <1398776651.22079.4.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by damnhippie.dyndns.org id s3TD4B62016272 Cc: FreeBSD Current , Warner Losh X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2014 13:04:15 -0000 On Tue, 2014-04-29 at 13:31 +0800, Julian Elischer wrote: > On 4/29/14, 8:57 AM, Ian Lepore wrote: > > On Mon, 2014-04-28 at 18:36 -0600, Warner Losh wrote: > >> On Apr 28, 2014, at 1:48 AM, Julian Elischer wr= ote: > >> > >>> I need to do the equivalent of "cd /usr/src/cddl/usr.sbin/dtrace; = make DESTDIR=3D/mumble all install=94 > >> cd /usr/src > >> make distributeworld DESTDIR=3D/mumble > >> cd cddl/usr.sbin/dtrace > >> make buildenv > >> make all install > >> > >>> but it pulls in libraries from the base system, which differ slight= ly from those in the source tree. > >> The above will create the right /mumble hierarchy, and will pull the= libraries from the build rather than the local system. > >> > >>> How can I force it to use /mumble2/include and /mumble2/lib instead= of / ? > >>> > >>> I can pre-populate /mumble2 using "make buildworld", "make librarie= s", and "make includes" but > >>> I need to be able to do selective builds of just subdirectories aft= er that.. I haven't spotted the right way of forcing the use of the "--s= ystem_root /mumble2" option in the compiles. > >>> > >>> I know we do it in 'buildworld' is there a more generic way? > >>> > >>> I have been looking in the .mk files but I haven't spotted it so fa= r. > >> You=92re asking for some serious split-brain action. chroot builds a= re likely your best option. There=92s no easy way to force this, although= you might get some milage out of WMAKEENV options, but I think we bake m= ost of the where to look for things options into the binaries. One crazy = option would be to set CC=3D=93cc =97sysroot /mumble=94 but I=92m sure th= ere be dragons there=85 > >> > >> Good luck with this crazy, never have we supported it very well, opt= ion :) > >> > >> 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" > > > > -- Ian > > > > > > > > > Is there a way to specify a different toolchain destination? i.e. not=20 > /usr/obj/usr/src/tmp ? >=20 Not right now -- all that stuff is in Makefile.inc1 (WORLDTMP var and related stuff) and there are no provisions for overriding it. -- Ian