diff options
author | Ed Maste <emaste@FreeBSD.org> | 2024-12-31 14:47:33 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2025-01-11 13:44:53 +0000 |
commit | 6eae413a25450c99a5d91d443569c3c1a51b4a4d (patch) | |
tree | b4562090fa65f2c1d7bdfd93f7b3cf405e881122 | |
parent | 9d6043f980a2ee424976c71c437888c9095f8142 (diff) |
build: Check NO_ROOT and METALOG for more targets
In f6575ed0deb08 I added a check that DISTDIR is set and is not / for
`make distributeworld`. Extend the check to `distributekernel` and the
two package* targets as the same argument applies.
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48339
-rw-r--r-- | Makefile.inc1 | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index fe799218ab0a..c8e6e63d2e39 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1000,13 +1000,18 @@ INSTALLFLAGS+= -h sha256 IMAKE_INSTALL= INSTALL="${INSTALL_CMD} ${INSTALLFLAGS}" IMAKE_MTREE= MTREE_CMD="${MTREE_CMD} ${MTREEFLAGS}" .endif -.if make(distributeworld) + +.if make(distributeworld) || make(packageworld) || make(distributekernel) || \ + make(packagekernel) .if ${DISTDIR:U/} == / -.error DISTDIR must be set for make distributeworld and may not be the root directory. +.error DISTDIR must be set for make distribute* and make package*, and may not be the root directory. .endif .if !defined(NO_ROOT) || !defined(METALOG) -.error NO_ROOT and METALOG must be set for make distributeworld. +.error NO_ROOT and METALOG must be set for make distribute* and make package*. +.endif .endif + +.if make(distributeworld) CERTCTLDESTDIR= ${DESTDIR}/${DISTDIR} CERTCTLFLAGS+= -d /base .else |