Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Aug 2004 16:47:22 +0300
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Harti Brandt <harti@freebsd.org>
Cc:        current@freebsd.org
Subject:   Re: BETA1 5.3 make world DESTDIR failure
Message-ID:  <20040825134722.GD5872@ip.net.ua>
In-Reply-To: <20040825134842.M553@beagle.kn.op.dlr.de>
References:  <1093402508.488.8.camel@home> <20040825134842.M553@beagle.kn.op.dlr.de>

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

[-- Attachment #1 --]
On Wed, Aug 25, 2004 at 01:50:36PM +0200, Harti Brandt wrote:
> On Wed, 25 Aug 2004, Marten wrote:
> 
> M>a problem with DESTDIR option occured...
> M>
> M>I did an install from cd beta 5.3
> M>cvsup to RELENG_5
> M>make buildworld
> M>make buildkernel
> M>make installkernel
> M>make installworld
> M>reboot
> M>
> M>up till here all is fine.
> M>
> M>from some source 
> M>
> M>make world DESTDIR=/ is ok
> M>but
> M>make world DESTDIR=/<other_path> returns an error 
> 
> I don't think that posting the same question under several accounts does 
> actually help, but anyway try:
> 
> DESTDIR=/foo make world
> 
> You _SHOULD_!!! better use buildworld/installworld targets:
> 
> make buildworld
> DESTDIR=/foo make installworld
> 
With installworld, you can specify DESTDIR as a command-line variable,
as IMAKEENV (from Makefile.inc1) doesn't utilize DESTDIR.  I think I
know how to fix "make world DESTDIR=/foo" to make it work again -- we
need to convert all DESTDIR uses in Makefile.inc1 to be command-line
variables.  I'm currently testing this patch, and it looks promising:

%%%
Index: Makefile.inc1
===================================================================
RCS file: /home/ncvs/src/Makefile.inc1,v
retrieving revision 1.441
diff -u -r1.441 Makefile.inc1
--- Makefile.inc1	24 Aug 2004 23:12:16 -0000	1.441
+++ Makefile.inc1	25 Aug 2004 13:36:49 -0000
@@ -177,13 +177,13 @@
 		GROFF_TMAC_PATH=${WORLDTMP}/legacy/usr/share/tmac
 
 # bootstrap-tools stage
-BMAKEENV=	DESTDIR= \
-		INSTALL="sh ${.CURDIR}/tools/install.sh" \
+BMAKEENV=	INSTALL="sh ${.CURDIR}/tools/install.sh" \
 		PATH=${BPATH}:${PATH} \
 		WORLDTMP=${WORLDTMP} \
 		MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}"
 BMAKE=		MAKEOBJDIRPREFIX=${WORLDTMP} \
 		${BMAKEENV} ${MAKE} -f Makefile.inc1 \
+		DESTDIR= \
 		BOOTSTRAPPING=${OSRELDATE} \
 		-DNOHTML -DNOINFO -DNOLINT -DNOMAN -DNOPIC -DNOPROFILE \
 		-DNOSHARED -DNO_CPU_CFLAGS -DNO_WARNS
@@ -191,6 +191,7 @@
 # build-tools stage
 TMAKE=		MAKEOBJDIRPREFIX=${OBJTREE} \
 		${BMAKEENV} ${MAKE} -f Makefile.inc1 \
+		DESTDIR= \
 		BOOTSTRAPPING=${OSRELDATE} -DNOLINT -DNO_CPU_CFLAGS -DNO_WARNS
 
 # cross-tools stage
@@ -198,11 +199,10 @@
 
 # world stage
 WMAKEENV=	${CROSSENV} \
-		DESTDIR=${WORLDTMP} \
 		_SHLIBDIRPREFIX=${WORLDTMP} \
 		INSTALL="sh ${.CURDIR}/tools/install.sh" \
 		PATH=${TMPPATH}
-WMAKE=		${WMAKEENV} ${MAKE} -f Makefile.inc1
+WMAKE=		${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP}
 
 # install stage
 .if empty(.MAKEFLAGS:M-n)
%%%

I didn't "fix" ``${KMAKEENV} ${MAKE}'' because their uses don't need ${DESTDIR}
pointing to ${WORLDTMP}.


Cheers,
-- 
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (FreeBSD)

iD8DBQFBLJhqqRfpzJluFF4RAqxuAKCFr/mZAnAoT+rObkLOMBOhilQobgCfRUcD
5StBQ9Z2TtyOzNLs+O6WGF4=
=yg/R
-----END PGP SIGNATURE-----

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