aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2025-09-24 18:41:29 +0000
committerWarner Losh <imp@FreeBSD.org>2025-09-24 19:54:51 +0000
commitd466cb731a2317ec91a89684e9d6a915fdfcc2ff (patch)
tree8265eb68772772aba1877ce25367c67018ac9eb1
parentc7a4cdd09f462922510c24dc49010b1c603c3c1a (diff)
make packages: Fix edge case of no kernel
When NO_INSTALLKERNEL and NO_INSTALLEXTRAKERNELS are set, or when BUILDKERNELS is empty, we can fail to define the create-kernel-packages make target, which we call unconditionally. So if do not have a kernel staging dir, go ahead and provide an empty create-kernel-packages so that when it's used elsewhere, the build succeeds. This lets me build a tree and package it when I don't have a kernel, for jails and other similar environments. There's no change if any kernels are built, since that will provide the necessary make target that does useful things for that case. Sponsored by: Netflix
-rw-r--r--Makefile.inc13
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index e98b5f233b51..92570d1d2fb9 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2314,6 +2314,9 @@ create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap
-r ${KSTAGEDIR}/${DISTDIR} \
-o ${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR}
. endfor
+.else
+create-kernel-packages: .PHONY
+
.endif
.if ${BUILDKERNELS:[#]} > 1 && ${NO_INSTALLEXTRAKERNELS} != "yes"
. for _kernel in ${BUILDKERNELS:[2..-1]}