Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Oct 2013 10:47:50 -0600
From:      Ian Lepore <ian@FreeBSD.org>
To:        Patrick Kelsey <kelsey@ieee.org>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: [patch] 'make DESTDIR=/any/nonroot/dir ... xdev' is broken
Message-ID:  <1381942070.1168.42.camel@revolution.hippie.lan>
In-Reply-To: <CAD44qMUoyzB0aO%2BRFZkZANg4_uPBtWQjQQLGVJKmtKszodtxEQ@mail.gmail.com>
References:  <CAD44qMUoyzB0aO%2BRFZkZANg4_uPBtWQjQQLGVJKmtKszodtxEQ@mail.gmail.com>

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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1381942070.1168.42.camel>