MFC the following:

o Makefile: 1.319, 1,320
o Makefile.inc1: 1.500, 1.508, 1.509, 1.513, 1.515, 1.517

- Embed the "buildkernels" target into the "universe" target so that
  the "make -n universe" output looks more builder (human) friendly.

- Wrap the "universe" target into a ".if make(universe)"; it's only
  intended to be called directly so it should be safe to do it.

- Make the `distrib-dirs' target official and working properly
  when cross-building (installing).  (This is useful for NFS
  installing world/kernel to another architecture machine.)

- Remove duplicate settings from LIB32MAKE definition.
- Install lib32 bits using the real install(1) program.
- clean ${LIB32TMP} in _worldtmp
- clean ${OBJTREE}/lib32 in _cleanobj
- ensure that ${WORLDTMP} exists in build32

- Require DESTDIR to be set when cross-installing.

- Force a full Groff upgrade during the build.
This commit is contained in:
ru 2005-11-16 06:56:09 +00:00
parent 513cdf04e1
commit 7f5d5be77d
2 changed files with 42 additions and 28 deletions

View File

@ -64,7 +64,7 @@
#
TGTS= all all-man buildenv buildkernel buildworld checkdpadd clean \
cleandepend cleandir depend distribute distributeworld \
distribution everything \
distrib-dirs distribution everything \
hierarchy install installcheck installkernel installkernel.debug\
reinstallkernel reinstallkernel.debug installworld \
kernel-toolchain libraries lint maninstall \
@ -254,6 +254,7 @@ make: .PHONY
# with a reasonable chance of success, regardless of how old your
# existing system is.
#
.if make(universe)
universe: universe_prologue
universe_prologue:
@echo "--------------------------------------------------------------"
@ -262,6 +263,9 @@ universe_prologue:
.for target in i386 i386:pc98 sparc64 alpha ia64 amd64
.for arch in ${target:C/:.*$//}
.for mach in ${target:C/^.*://}
KERNCONFS!= cd ${.CURDIR}/sys/${mach}/conf && \
find [A-Z]*[A-Z] -type f -maxdepth 0
KERNCONFS:= ${KERNCONFS:S/^NOTES$/LINT/}
universe: universe_${mach}
.ORDER: universe_prologue universe_${mach} universe_epilogue
universe_${mach}:
@ -275,7 +279,13 @@ universe_${mach}:
-cd ${.CURDIR}/sys/${mach}/conf && ${MAKE} LINT \
> ${.CURDIR}/_.${mach}.makeLINT 2>&1
.endif
cd ${.CURDIR} && ${MAKE} buildkernels TARGET_ARCH=${arch} TARGET=${mach}
.for kernel in ${KERNCONFS}
-cd ${.CURDIR} && ${MAKE} ${JFLAG} buildkernel \
TARGET_ARCH=${arch} TARGET=${mach} \
KERNCONF=${kernel} \
__MAKE_CONF=/dev/null \
> _.${mach}.${kernel} 2>&1
.endfor
@echo ">> ${mach} completed on `LC_ALL=C date`"
.endfor
.endfor
@ -286,15 +296,4 @@ universe_epilogue:
@echo ">>> make universe completed on `LC_ALL=C date`"
@echo " (started ${STARTTIME})"
@echo "--------------------------------------------------------------"
.if make(buildkernels)
KERNCONFS!= cd ${.CURDIR}/sys/${TARGET}/conf && \
find [A-Z]*[A-Z] -type f -maxdepth 0 ! -name NOTES
buildkernels:
.for kernel in ${KERNCONFS}
-cd ${.CURDIR} && ${MAKE} ${JFLAG} buildkernel \
KERNCONF=${kernel} \
__MAKE_CONF=/dev/null \
> _.${TARGET}.${kernel} 2>&1
.endfor
.endif

View File

@ -236,14 +236,8 @@ LIB32MAKEENV= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \
SHLIBDIR=/usr/lib32
LIB32MAKE= ${LIB32MAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \
-DNO_BIND -DNO_MAN -DNO_NLS -DNO_INFO -DNO_HTML \
CC="${CC} ${LIB32CC}" \
CXX="${CXX} ${LIB32CXX}" \
OBJC="${OBJC} ${LIB32OBJC}" \
LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \
AS="${AS} --32" \
LIBDIR=/usr/lib32 \
SHLIBDIR=/usr/lib32
-DNO_BIND -DNO_MAN -DNO_NLS -DNO_INFO -DNO_HTML
LIB32IMAKE= ${LIB32MAKE:NINSTALL=*}
.endif
# install stage
@ -280,6 +274,9 @@ _worldtmp:
@echo "--------------------------------------------------------------"
.if !defined(NO_CLEAN)
rm -rf ${WORLDTMP}
.if ${TARGET_ARCH} == "amd64"
rm -rf ${LIB32TMP}
.endif
.else
rm -rf ${WORLDTMP}/legacy/usr/include
# XXX - These two can depend on any header file.
@ -338,6 +335,9 @@ _cleanobj:
@echo ">>> stage 2.1: cleaning up the object tree"
@echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/}
.if ${TARGET_ARCH} == "amd64"
rm -rf ${OBJTREE}/lib32
.endif
.endif
_obj:
@echo
@ -397,6 +397,7 @@ build32:
.endfor
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${LIB32TMP}/usr/include >/dev/null
mkdir -p ${WORLDTMP}
ln -sf ${.CURDIR}/sys ${WORLDTMP}
.if !defined(NO_KERBEROS) && !defined(NO_CRYPT) && !defined(NO_OPENSSL)
.for _t in obj depend all
@ -441,12 +442,12 @@ distribute32 install32:
.else
mkdir -p ${DESTDIR}/usr/lib32 # XXX add to mtree
.endif
cd ${.CURDIR}/lib; ${LIB32MAKE} ${.TARGET:S/32$//}
cd ${.CURDIR}/gnu/lib; ${LIB32MAKE} ${.TARGET:S/32$//}
cd ${.CURDIR}/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
cd ${.CURDIR}/gnu/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
.if !defined(NO_CRYPT)
cd ${.CURDIR}/secure/lib; ${LIB32MAKE} ${.TARGET:S/32$//}
cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
.endif
cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32MAKE} ${.TARGET:S/32$//}
cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//}
.endif
@ -479,6 +480,20 @@ kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_libraries}
#
SPECIAL_INSTALLCHECKS=
#
# Require DESTDIR to be set if installing for a different architecture.
#
.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${TARGET} != ${MACHINE}
.if !make(distributeworld)
SPECIAL_INSTALLCHECKS+= installcheck_DESTDIR
installcheck_DESTDIR:
.if !defined(DESTDIR) || empty(DESTDIR)
@echo "ERROR: Please set DESTDIR!"; \
false
.endif
.endif
.endif
#
# installcheck
#
@ -558,8 +573,8 @@ redistribute:
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 DISTRIBUTION=lib32
.endif
distribution:
cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} distribution
distrib-dirs distribution:
cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} ${.TARGET}
#
# buildkernel and installkernel
@ -776,7 +791,7 @@ _strfile= games/fortune/strfile
.if !defined(NO_CXX)
_gperf= gnu/usr.bin/gperf
.if ${BOOTSTRAPPING} < 500113
.if ${BOOTSTRAPPING} < 600101
_groff= gnu/usr.bin/groff
.else
_groff= gnu/usr.bin/groff/tmac