Re: Is cross-world building broken?

From: Simon J. Gerraty <sjg_at_juniper.net>
Date: Fri, 30 Nov 2012 09:36:56 -0800
On Fri, 30 Nov 2012 08:15:03 -0700, Ian Lepore writes:
>So when did this break, and why can't it be fixed?  I've been using

Sorry I missed the begining of this thread,
is anything broken?

>Also, how about "make DESTDIR=foo buildkernel installkernel" which is
>something I've been doing for years, you're saying that now that won't
>work because DESTDIR will be there during the build part?

It will be set - but that doesn't mean it would have any effect/impact.

Oh and contrary to what I told Adrian earlier, buildworld's manipulation
of DESTDIR would generally be unaffected, because the makefiles do not
actually attempt to set it (vs simply passing a new value to a submake).

An demo might help.

In the following
BINDIR is affected by a value set in either environment or on
commandline
LIBDIR is only affected by a value set on commandline
The DESTDIR seen by install run by child is unaffected by anything, even
though the values for LIBDIR and BINDIR are.


--------------------8<--------------------
BINDIR?= /bin
LIBDIR= /lib

all: install child 

install:
	_at_echo DESTDIR=${DESTDIR}
	_at_echo install stuff to ${DESTDIR}${BINDIR}
	_at_echo install stuff to ${DESTDIR}${LIBDIR}

child:
	${MAKE} -f ${MAKEFILE} DESTDIR=/tmp/childest install


demo:	 all envset cmdset


envset:
	BINDIR=/sbin LIBDIR=/usr/lib DESTDIR=$_at_ ${MAKE} -f ${MAKEFILE} 

cmdset:
	${MAKE} -f ${MAKEFILE} BINDIR=/sbin LIBDIR=/usr/lib DESTDIR=$_at_
--------------------8<--------------------

$ make -r -f /homes/sjg/make-tests/destdir demo 
DESTDIR=
install stuff to /bin
install stuff to /lib
make -f /homes/sjg/make-tests/destdir DESTDIR=/tmp/childest install
DESTDIR=/tmp/childest
install stuff to /tmp/childest/bin
install stuff to /tmp/childest/lib
BINDIR=/sbin LIBDIR=/usr/lib DESTDIR=envset make -f
/homes/sjg/make-tests/destdir
DESTDIR=envset
install stuff to envset/sbin
install stuff to envset/lib
make -f /homes/sjg/make-tests/destdir DESTDIR=/tmp/childest install
DESTDIR=/tmp/childest
install stuff to /tmp/childest/sbin
install stuff to /tmp/childest/lib
make -f /homes/sjg/make-tests/destdir BINDIR=/sbin LIBDIR=/usr/lib
DESTDIR=cmdset
DESTDIR=cmdset
install stuff to cmdset/sbin
install stuff to cmdset/usr/lib
make -f /homes/sjg/make-tests/destdir DESTDIR=/tmp/childest install
DESTDIR=/tmp/childest
install stuff to /tmp/childest/sbin
install stuff to /tmp/childest/lib
$
Received on Fri Nov 30 2012 - 16:47:20 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:32 UTC