From owner-freebsd-current@FreeBSD.ORG Mon Apr 28 15:57:02 2014 Return-Path: Delivered-To: freebsd-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 D682761F for ; Mon, 28 Apr 2014 15:57:02 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id C431D1E65 for ; Mon, 28 Apr 2014 15:57:02 +0000 (UTC) Received: from Alfreds-MacBook-Pro-9.local (c-76-21-10-192.hsd1.ca.comcast.net [76.21.10.192]) by elvis.mu.org (Postfix) with ESMTPSA id 861591A3C20 for ; Mon, 28 Apr 2014 08:57:02 -0700 (PDT) Message-ID: <535E7A4E.3090305@freebsd.org> Date: Mon, 28 Apr 2014 08:57:02 -0700 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: freebsd-current@freebsd.org Subject: Re: Make variables to force non default libraries and includes? References: <535E07C9.5060309@freebsd.org> In-Reply-To: <535E07C9.5060309@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Mon, 28 Apr 2014 15:57:02 -0000 On 4/28/14 12:48 AM, Julian Elischer wrote: > I need to do the equivalent of "cd /usr/src/cddl/usr.sbin/dtrace; > make DESTDIR=/mumble all install" > > but it pulls in libraries from the base system, which differ slightly > from those in the source tree. > > How can I force it to use /mumble2/include and /mumble2/lib instead of > / ? > > 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 > "--system_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 far. > There may be a way to use bsd.*.mk to do this, however we just use chroots + nullfs mounts. Basically we buildworld into a directory and then nullfs mount our other sources under it, then we chroot to that "build". I recommend doing this (or even using vms) as it's way too easy to introduce contamination from the host build environment otherwise. -Alfred