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@
This commit is contained in:
parent
0bbfd99009
commit
0a9458250a
18
Makefile
18
Makefile
@ -144,14 +144,17 @@ ${TGTS}:
|
|||||||
# Set a reasonable default
|
# Set a reasonable default
|
||||||
.MAIN: all
|
.MAIN: all
|
||||||
|
|
||||||
|
.if defined(DESTDIR)
|
||||||
.if make(world)
|
.if make(world)
|
||||||
STARTTIME!= LC_ALL=C date
|
STARTTIME!= LC_ALL=C date
|
||||||
.endif
|
.endif
|
||||||
#
|
#
|
||||||
# world
|
# world
|
||||||
#
|
#
|
||||||
# Attempt to rebuild and reinstall *everything*, with reasonable chance of
|
# Attempt to rebuild and reinstall everything. This target is not to be
|
||||||
# success, regardless of how old your existing system is.
|
# 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
|
world: upgrade_checks
|
||||||
@echo "--------------------------------------------------------------"
|
@echo "--------------------------------------------------------------"
|
||||||
@ -178,6 +181,17 @@ world: upgrade_checks
|
|||||||
@echo ">>> make world completed on `LC_ALL=C date`"
|
@echo ">>> make world completed on `LC_ALL=C date`"
|
||||||
@echo " (started ${STARTTIME})"
|
@echo " (started ${STARTTIME})"
|
||||||
@echo "--------------------------------------------------------------"
|
@echo "--------------------------------------------------------------"
|
||||||
|
.else
|
||||||
|
world:
|
||||||
|
@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
|
||||||
|
.endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# kernel
|
# kernel
|
||||||
|
Loading…
Reference in New Issue
Block a user