Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Oct 2013 00:51:18 -0400
From:      Patrick Kelsey <kelsey@ieee.org>
To:        freebsd-hackers@freebsd.org
Subject:   [patch] 'make DESTDIR=/any/nonroot/dir ... xdev' is broken
Message-ID:  <CAD44qMUoyzB0aO%2BRFZkZANg4_uPBtWQjQQLGVJKmtKszodtxEQ@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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; \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAD44qMUoyzB0aO%2BRFZkZANg4_uPBtWQjQQLGVJKmtKszodtxEQ>