From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 15 04:51:20 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 B1722FA9 for ; Tue, 15 Oct 2013 04:51:20 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: from mail-bk0-x234.google.com (mail-bk0-x234.google.com [IPv6:2a00:1450:4008:c01::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4AF77200B for ; Tue, 15 Oct 2013 04:51:20 +0000 (UTC) Received: by mail-bk0-f52.google.com with SMTP id e11so3011739bkh.11 for ; Mon, 14 Oct 2013 21:51:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=zkxhcOaGh2qPUUDMDwzt4IZNDkYO8H+tqiHSCSsjH7A=; b=Vm/HmPpuW204FMFj41+986vy0ZRi1myUduTdc55iBiVSzg9Cv5T1k9od6527d/kavR qC8k4ecXVjZ6pG1d6FxdUleCgXTxH9HrpXsRTKifWDfKxDGOqOZaAvW1n8ubZFF17Bhb RsufhXFnAQV9mKTgtFvARU7oN+EIzTgPQTS/cli3ybPRQ3wKjZksV1ULIVocwHW8k7Oh 0avMEJdmcerAA9r9yez/jml6h9TTwn11f3lnEeJZn20Wa6fcMHSFMRQEE3mb1v+kqjoc 0T6zTg2AyPTyf5R/KZWzj4Jh1/scp3JdTe2Ll/puA9WOKyjam6pi+zq1sDDbQvCgb9jo 9tkA== MIME-Version: 1.0 X-Received: by 10.205.35.15 with SMTP id su15mr33173468bkb.21.1381812678481; Mon, 14 Oct 2013 21:51:18 -0700 (PDT) Sender: pkelsey@gmail.com Received: by 10.204.100.69 with HTTP; Mon, 14 Oct 2013 21:51:18 -0700 (PDT) Date: Tue, 15 Oct 2013 00:51:18 -0400 X-Google-Sender-Auth: T45UVzsjAdFCEpXNTDQqcPTFqfw Message-ID: Subject: [patch] 'make DESTDIR=/any/nonroot/dir ... xdev' is broken From: Patrick Kelsey To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 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: Tue, 15 Oct 2013 04:51:20 -0000 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; \