path: root/Makefile
diff options
authorMarcel Moolenaar <marcel@FreeBSD.org>2004-07-16 02:51:28 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2004-07-16 02:51:28 +0000
commit0a9458250adabf22c832f7aadb3afc5272d711be (patch)
tree7ddeaede6e7d04597f0c776c62151aba2750e1ef /Makefile
parent0bbfd99009cc8e15b7c9a3ec3b46ba14c96f1ce4 (diff)
As per discussions on current@, protect unsuspecting users from
trying to upgrade their system with make world instead of following the preferred and suggested sequence of commands. The fact remains that make world does not upgrade the kernel. Allow make world when DESTDIR has been specified, including when DESTDIR specifies the root file system. Otherwise, print a useful warning and fail. Reviewed, tested and scrutinized by: gad@
Notes: svn path=/head/; revision=132234
Diffstat (limited to 'Makefile')
1 files changed, 16 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index ccc9f94814db..716cf04d7a20 100644
--- a/Makefile
+++ b/Makefile
@@ -144,14 +144,17 @@ ${TGTS}:
# Set a reasonable default
.MAIN: all
+.if defined(DESTDIR)
.if make(world)
# world
-# Attempt to rebuild and reinstall *everything*, with reasonable chance of
-# success, regardless of how old your existing system is.
+# Attempt to rebuild and reinstall everything. This target is not to be
+# used for upgrading an existing FreeBSD system, because the kernel is
+# not included. One can argue that this target doesn't build everything
+# then.
world: upgrade_checks
@echo "--------------------------------------------------------------"
@@ -178,6 +181,17 @@ world: upgrade_checks
@echo ">>> make world completed on `LC_ALL=C date`"
@echo " (started ${STARTTIME})"
@echo "--------------------------------------------------------------"
+ @echo "WARNING: make world will overwrite your existing FreeBSD"
+ @echo "installation without also building and installing a new"
+ @echo "kernel. This can be dangerous. Please read the handbook,"
+ @echo "'Using make world', for how to upgrade your system."
+ @echo "Define DESTDIR to the where you want to install FreeBSD,
+ @echo "including /, to override this warning and proceed as usual."
+ @echo "Bailing out now..."
+ @false
# kernel