Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Sep 2025 19:56:26 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: d466cb731a23 - main - make packages: Fix edge case of no kernel
Message-ID:  <202509241956.58OJuQZh005474@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=d466cb731a2317ec91a89684e9d6a915fdfcc2ff

commit d466cb731a2317ec91a89684e9d6a915fdfcc2ff
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2025-09-24 18:41:29 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-09-24 19:54:51 +0000

    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
---
 Makefile.inc1 | 3 +++
 1 file changed, 3 insertions(+)

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]}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202509241956.58OJuQZh005474>