From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 16 16:47:54 2013 Return-Path: Delivered-To: freebsd-hackers@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 ESMTP id 531736F6 for ; Wed, 16 Oct 2013 16:47:54 +0000 (UTC) (envelope-from ian@FreeBSD.org) 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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 29E7F2B6E for ; Wed, 16 Oct 2013 16:47:53 +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 1VWUGG-0009Oh-T2; Wed, 16 Oct 2013 16:47:53 +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 r9GGlou8028549; Wed, 16 Oct 2013 10:47:50 -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: U2FsdGVkX18B0ZpJHfZHrVtqYhegvqq4 Subject: Re: [patch] 'make DESTDIR=/any/nonroot/dir ... xdev' is broken From: Ian Lepore To: Patrick Kelsey In-Reply-To: References: Content-Type: text/plain; charset="us-ascii" Date: Wed, 16 Oct 2013 10:47:50 -0600 Message-ID: <1381942070.1168.42.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Oct 2013 16:47:54 -0000 On Tue, 2013-10-15 at 00:51 -0400, Patrick Kelsey wrote: > Hi, > > The patch below makes building the xdev target with non-default values > of DESTDIR work. It also removes the leading '/' from XDTP to clean > up path construction using that var. > > -Patrick > > > Index: Makefile.inc1 > =================================================================== > --- Makefile.inc1 (revision 256489) > +++ Makefile.inc1 (working copy) > @@ -1830,7 +1830,7 @@ > CPUTYPE=${XDEV_CPUTYPE} > > XDDIR=${XDEV_ARCH}-freebsd > -XDTP=/usr/${XDDIR} > +XDTP=usr/${XDDIR} > CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} \ > INSTALL="sh ${.CURDIR}/tools/install.sh" > CDENV= ${CDBENV} \ > @@ -1843,8 +1843,8 @@ > > CDTMP= ${MAKEOBJDIRPREFIX}/${XDDIR}/${.CURDIR}/tmp > CDMAKE=${CDENV} PATH=${CDTMP}/usr/bin:${PATH} ${MAKE} ${NOFUN} > -CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDTP}/usr/bin:${PATH} > ${MAKE} ${NOFUN} > -XDDESTDIR=${DESTDIR}${XDTP} > +CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDDESTDIR}/usr/bin:${PATH} > ${MAKE} ${NOFUN} > +XDDESTDIR=${DESTDIR}/${XDTP} > .if !defined(OSREL) > OSREL!= uname -r | sed -e 's/[-(].*//' > .endif > @@ -1924,6 +1924,7 @@ > > _xi-links: > ${_+_}cd ${XDDESTDIR}/usr/bin; \ > + mkdir -p ../../../../usr/bin; \ > for i in *; do \ > ln -sf ../../${XDTP}/usr/bin/$$i \ > ../../../../usr/bin/${XDDIR}-$$i; \ I verified that I could not do a 'make xdev' with DESTDIR= set to a non-default value, and it worked sucessfully after this patch was applied. Committed as r256640. -- Ian