We can't use ${WORLDTMP}/usr/{include,lib} for the compat layer. This
is because we populate these directories later, and a subsequent -DNOCLEAN build may fail. So, we put them in ${WORLDTMP}/build/usr/{include,lib} instead and adjust Makefile.boot. Again, this works on -stable and -current, but might break older versions. Submitted by: ru@
This commit is contained in:
parent
5222688930
commit
f7e19a98fd
@ -159,6 +159,9 @@ INSTALLTMP!= /usr/bin/mktemp -d -u -t install
|
||||
#
|
||||
# Building a world goes through the following stages
|
||||
#
|
||||
# 1. libbuild stage [BMAKE]
|
||||
# This stage is responsible for creating compatibility shims that are
|
||||
# needed by the bootstrap-tool, build-tool and cross-tool stages.
|
||||
# 1. bootstrap-tool stage [BMAKE]
|
||||
# This stage is responsible for creating programs that
|
||||
# are needed for backward compatibility reasons. They
|
||||
@ -276,6 +279,15 @@ _worldtmp:
|
||||
mkdir -p ${WORLDTMP}/usr/include/${_dir}
|
||||
.endfor
|
||||
ln -sf ${.CURDIR}/sys ${WORLDTMP}
|
||||
.for _dir in lib include include/sys
|
||||
mkdir -p ${WORLDTMP}/build/usr/${_dir}
|
||||
.endfor
|
||||
_libbuild:
|
||||
@echo
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo ">>> stage 1: libbuild"
|
||||
@echo "--------------------------------------------------------------"
|
||||
cd ${.CURDIR}; ${BMAKE} libbuild
|
||||
_bootstrap-tools:
|
||||
@echo
|
||||
@echo "--------------------------------------------------------------"
|
||||
@ -336,7 +348,7 @@ everything:
|
||||
|
||||
WMAKE_TGTS=
|
||||
.if !defined(SUBDIR_OVERRIDE)
|
||||
WMAKE_TGTS+= _worldtmp _bootstrap-tools
|
||||
WMAKE_TGTS+= _worldtmp _libbuild _bootstrap-tools
|
||||
.endif
|
||||
WMAKE_TGTS+= _cleanobj _obj _build-tools
|
||||
.if !defined(SUBDIR_OVERRIDE)
|
||||
@ -610,8 +622,18 @@ installmost:
|
||||
_strfile= games/fortune/strfile
|
||||
.endif
|
||||
|
||||
libbuild:
|
||||
.for _tool in tools/build
|
||||
@${ECHODIR} "===> ${_tool}"; \
|
||||
cd ${.CURDIR}/${_tool}; \
|
||||
${MAKE} DIRPRFX=${_tool}/ obj; \
|
||||
${MAKE} DIRPRFX=${_tool}/ depend; \
|
||||
${MAKE} DIRPRFX=${_tool}/ all; \
|
||||
${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/build install
|
||||
.endfor
|
||||
|
||||
bootstrap-tools:
|
||||
.for _tool in tools/build ${_strfile} usr.bin/yacc usr.bin/colldef \
|
||||
.for _tool in ${_strfile} usr.bin/yacc usr.bin/colldef \
|
||||
usr.bin/makewhatis usr.bin/rpcgen usr.bin/uudecode \
|
||||
usr.bin/xargs usr.bin/xinstall \
|
||||
usr.sbin/config usr.sbin/kbdcontrol \
|
||||
|
@ -1,16 +1,18 @@
|
||||
# $FreeBSD$
|
||||
|
||||
# FreeBSD didn't always have the __FBSDID() macro in <sys/cdefs.h>.
|
||||
# We could do this with a sys/cdefs.h wrapper, but given that this would
|
||||
# slow down all new builds for such a simple concept, we do it here.
|
||||
.if defined(BOOTSTRAPPING) && \
|
||||
( ${BOOTSTRAPPING} < 440001 || \
|
||||
( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500024 ))
|
||||
CFLAGS+= -D__FBSDID=__RCSID
|
||||
.endif
|
||||
|
||||
CFLAGS+= -I${WORLDTMP}/usr/include
|
||||
DPADD= ${WORLDTMP}/usr/lib/libbuild.a
|
||||
CFLAGS+= -I${WORLDTMP}/build/usr/include
|
||||
DPADD= ${WORLDTMP}/build/usr/lib/libbuild.a
|
||||
LDADD= -lbuild
|
||||
LDFLAGS= -L${WORLDTMP}/usr/lib
|
||||
LDFLAGS= -L${WORLDTMP}/build/usr/lib
|
||||
|
||||
OLD_MAKE_CONF?= /etc/make.conf
|
||||
.if exists(${OLD_MAKE_CONF})
|
||||
|
Loading…
Reference in New Issue
Block a user