summaryrefslogtreecommitdiffstats
path: root/Makefile.inc1
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2000-07-19 04:41:59 +0000
committermarcel <marcel@FreeBSD.org>2000-07-19 04:41:59 +0000
commite6caba2a6201f27d869d8d5add8103eac3741dc5 (patch)
tree71268bd952e7351c718c51ede30b7d8d736ae474 /Makefile.inc1
parent9a38ef3d034bff881c4ede9c838ebd50168a9d1b (diff)
downloadFreeBSD-src-e6caba2a6201f27d869d8d5add8103eac3741dc5.zip
FreeBSD-src-e6caba2a6201f27d869d8d5add8103eac3741dc5.tar.gz
Save any binaries we use by installworld, so that we won't use the
binaries we just installed. This allows a future upgrade target to install a new system without intermediate reboots and also prevents conflicts for parallel make runs where we might exec a binary that's being installed at the same time.
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc115
1 files changed, 13 insertions, 2 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 769786e..e892fa3 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -125,6 +125,10 @@ WORLDTMP= ${OBJTREE}${.CURDIR}/${BUILD_ARCH}
STRICTTMPPATH= ${WORLDTMP}/usr/sbin:${WORLDTMP}/usr/bin:${WORLDTMP}/usr/games
TMPPATH= ${STRICTTMPPATH}:${PATH}
+TMPDIR?= /tmp
+TMPPID!= echo $$$$
+INSTALLTMP= ${TMPDIR}/install.${TMPPID}
+
#
# Building a world goes through the following stages
#
@@ -186,7 +190,7 @@ WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1
# install stage
IMAKEENV= ${CROSSENV} \
- PATH=${TMPPATH}
+ PATH=${STRICTTMPPATH}:${INSTALLTMP}
IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1
USRDIRS= usr/bin usr/lib/compat/aout usr/games usr/libdata/ldscripts \
@@ -300,7 +304,14 @@ everything:
# Installs everything compiled by a 'buildworld'.
#
installworld:
+ mkdir -p ${INSTALLTMP}
+ for prog in [ cat chflags chown date echo egrep find grep install \
+ install-info ln make makewhatis mv perl rm sed sh sysctl test \
+ true uname zic; do \
+ cp `which $$prog` ${INSTALLTMP}; \
+ done
cd ${.CURDIR}; ${IMAKE} reinstall
+ rm -rf ${INSTALLTMP}
#
# reinstall
@@ -497,7 +508,7 @@ _strfile= games/fortune/strfile
bootstrap-tools:
.for _tool in ${_strfile} usr.bin/yacc usr.bin/colldef usr.sbin/config \
- gnu/usr.bin/gperf gnu/usr.bin/texinfo usr.sbin/mtree
+ usr.sbin/mtree gnu/usr.bin/gperf gnu/usr.bin/texinfo
cd ${.CURDIR}/${_tool}; \
${MAKE} obj; \
${MAKE} depend; \
OpenPOWER on IntegriCloud