summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2002-12-02 14:31:21 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2002-12-02 14:31:21 +0000
commit2e84ab947d9c82dbe4c1e35b2ff57e1feb5b6217 (patch)
tree40ea17ad6d388a183090db9c921cdbf4874b2984 /Makefile
parentfc599016e75bc3fa2e667bcafc4cdbb5df142d33 (diff)
downloadsrc-test2-2e84ab947d9c82dbe4c1e35b2ff57e1feb5b6217.tar.gz
src-test2-2e84ab947d9c82dbe4c1e35b2ff57e1feb5b6217.zip
If /usr/bin/make fails to pass the regression tests, it might not
be suitable for building. The old action here was to upgrade the make in /usr/bin. This is both bogus and does not work under non root. So, rather than overwriting the existing /usr/bin/make, we now install it into a safe location, and use it from there. Reviewed by: imp, marcel Approved by: re (rwatson)
Notes
Notes: svn path=/head/; revision=107516
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 20 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 222e4ed76c6d..2fe8533bd17a 100644
--- a/Makefile
+++ b/Makefile
@@ -102,7 +102,9 @@ BITGTS:=${BITGTS} ${BITGTS:S/^/build/} ${BITGTS:S/^/install/}
.ORDER: buildkernel installkernel
.ORDER: buildkernel reinstallkernel
-PATH= /sbin:/bin:/usr/sbin:/usr/bin
+MAKEOBJDIRPREFIX?= /usr/obj
+MAKEPATH= ${MAKEOBJDIRPREFIX}${.CURDIR}/make.${MACHINE_ARCH}
+PATH= ${MAKEPATH}:/sbin:/bin:/usr/sbin:/usr/bin
MAKE= PATH=${PATH} make -m ${.CURDIR}/share/mk -f Makefile.inc1
#
@@ -159,21 +161,32 @@ kernel: buildkernel installkernel
# for building the world.
#
upgrade_checks:
- @(cd ${.CURDIR}/tools/regression/usr.bin/make && make 2>/dev/null) || \
- (cd ${.CURDIR} && make make)
+ @(cd ${.CURDIR}/tools/regression/usr.bin/make && \
+ PATH=${PATH} make 2>/dev/null) || \
+ (cd ${.CURDIR} && make make)
#
-# Upgrade the installed make to the current version using the installed
+# Upgrade make(1) to the current version using the installed
# headers, libraries and tools.
#
+MMAKEENV= MAKEOBJDIRPREFIX=${MAKEPATH} \
+ DESTDIR= \
+ INSTALL="sh ${.CURDIR}/tools/install.sh"
+MMAKE= ${MMAKEENV} make \
+ -D_UPGRADING \
+ -DNOMAN -DNOSHARED \
+ -DNO_CPU_CFLAGS -DNO_WERROR
+
make:
@echo
@echo "--------------------------------------------------------------"
- @echo " Upgrading the installed make"
+ @echo " Upgrading make(1)"
@echo "--------------------------------------------------------------"
@cd ${.CURDIR}/usr.bin/make; \
- make obj && make -D_UPGRADING depend && \
- make -D_UPGRADING all && make install
+ ${MMAKE} obj && \
+ ${MMAKE} depend && \
+ ${MMAKE} all && \
+ ${MMAKE} install DESTDIR=${MAKEPATH} BINDIR=
#
# Define the upgrade targets. These are listed here in alphabetical