Re: BETA1 5.3 make world DESTDIR failure

From: Ruslan Ermilov <ru_at_freebsd.org>
Date: Wed, 25 Aug 2004 16:47:22 +0300
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
_at__at_ -177,13 +177,13 _at__at_
 		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
_at__at_ -191,6 +191,7 _at__at_
 # build-tools stage
 TMAKE=		MAKEOBJDIRPREFIX=${OBJTREE} \
 		${BMAKEENV} ${MAKE} -f Makefile.inc1 \
+		DESTDIR= \
 		BOOTSTRAPPING=${OSRELDATE} -DNOLINT -DNO_CPU_CFLAGS -DNO_WARNS
 
 # cross-tools stage
_at__at_ -198,11 +199,10 _at__at_
 
 # 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_at_FreeBSD.org
FreeBSD committer

Received on Wed Aug 25 2004 - 11:47:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:08 UTC