Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Nov 2012 09:36:56 -0800
From:      "Simon J. Gerraty" <sjg@juniper.net>
To:        Ian Lepore <freebsd@damnhippie.dyndns.org>
Cc:        Garrett Cooper <yanegomi@gmail.com>, Andrew Turner <andrew@freebsd.org>, Adrian Chadd <adrian@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>, sjg@juniper.net
Subject:   Re: Is cross-world building broken?
Message-ID:  <20121130173656.9A9BE58094@chaos.jnpr.net>
In-Reply-To: <1354288503.69940.410.camel@revolution.hippie.lan>
References:  <CAJ-Vmo=EahyCf0GmPW6j81VjOs-qRoHWiQrEDedk5rj8sgk6nA@mail.gmail.com> <CAJ-Vmo=Z1SAuMbD=ATTGJ-SVg%2B-FaJ%2BS3bBaHv9Hg3c8AzUquA@mail.gmail.com> <6961B0D9-F823-415C-A105-7DAC8339CB30@gmail.com> <CAJ-VmomMv_GHMdN7dSD5QnPJ-TYDhSqHjhRJQETZGB8LOL4dVA@mail.gmail.com> <3EB9F7EB-D9C8-40CB-BF28-21B7BE59C94C@gmail.com> <20121128071252.7AC1958094@chaos.jnpr.net> <CAJ-VmomzK=fV-jNngsyDNw9kGboBeP91qRAQZqo=2SvDqPYhVQ@mail.gmail.com> <20121128231538.8AB6758094@chaos.jnpr.net> <CAJ-Vmonmgr3B0Zr5=V=d4gx1xRNcx0PecFDbZOv1PQ7Zk_7qyw@mail.gmail.com> <20121129000106.540ED58094@chaos.jnpr.net> <CAJ-VmokJkwcffpKTzmMrDU1y9Cqxh0vKCLDrS21obimAhVzY0g@mail.gmail.com> <CAGH67wQPajsRJaiAwAinS4XVz1kLrEB450Lcc6%2BZqF2h=rHTBQ@mail.gmail.com> <1354288503.69940.410.camel@revolution.hippie.lan>

next in thread | previous in thread | raw e-mail | index | archive | help

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:
	@echo DESTDIR=${DESTDIR}
	@echo install stuff to ${DESTDIR}${BINDIR}
	@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=$@ ${MAKE} -f ${MAKEFILE} 

cmdset:
	${MAKE} -f ${MAKEFILE} BINDIR=/sbin LIBDIR=/usr/lib DESTDIR=$@
--------------------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
$



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