HomeFreeBSD

Makefile.inc1: Fix INSTALLEXTRAKERNELS for one-kernel case

Description

Makefile.inc1: Fix INSTALLEXTRAKERNELS for one-kernel case

If BUILDKERNELS contains a single kernel, and NO_INSTALLEXTRAKERNELS=no,
then ${BUILDKERNELS:[2..-1]} returns the first kernel in the list and
that kernel ends up in both INSTALLKERNEL and INSTALLEXTRAKERNELS.

This breaks the package build because it means we generate that package
twice, once with an incorrect install path of /boot/kernel.NAME instead
of /boot/kernel.

Only set INSTALLEXTRAKERNELS if we're building at least two kernels.

Fixes: 2c0e9a76c1ce ("Makefile.inc1: Make NO_INSTALLKERNEL less of a hack")
Reviewed by: jrtc27
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D54539

Details

Provenance
ivyAuthored on Jan 6 2026, 1:48 AM
Reviewer
jrtc27
Differential Revision
D54539: Makefile.inc1: Fix INSTALLEXTRAKERNELS for one-kernel case
Parents
rGf224591746bd: Add ASMC_DEBUG make option
Branches
Unknown
Tags
Unknown