Makefile.inc1: Require DISTDIR be set for make distributeworld

distributeworld is the target used to stage world for building dist sets
for release targets, and is not really intended for end-user use.  If
DISTDIR is not set we would attempt to write to the root directory.
Error out in this case, serving as an assertion that an internal target
is not being used incorrectly.

Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48030
This commit is contained in:
Ed Maste
2024-12-11 10:53:42 -05:00
parent 9899985293
commit f6575ed0de
+3
View File
@@ -1001,6 +1001,9 @@ IMAKE_INSTALL= INSTALL="${INSTALL_CMD} ${INSTALLFLAGS}"
IMAKE_MTREE= MTREE_CMD="${MTREE_CMD} ${MTREEFLAGS}"
.endif
.if make(distributeworld)
.if ${DISTDIR:U/} == /
.error DISTDIR must be set for make distributeworld and may not be the root directory.
.endif
CERTCTLDESTDIR= ${DESTDIR}/${DISTDIR}
CERTCTLFLAGS+= -d /base
.else