aboutsummaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2000-07-19 04:41:59 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2000-07-19 04:41:59 +0000
commit767ab900c6d7eba922752d073a679f7ada50586e (patch)
tree622a170afd685045a21a23f9dd32b21fc51342c0 /Makefile.inc1
parent1038894eb08ab9fe9df118a397394f4877a742ea (diff)
downloadsrc-767ab900c6d7eba922752d073a679f7ada50586e.tar.gz
src-767ab900c6d7eba922752d073a679f7ada50586e.zip
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.
Notes
Notes: svn path=/head/; revision=63487
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 769786e6b3c8..e892fa36df29 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; \