HomeFreeBSD

bsd.mkopt.mk: Prepare a list of all build options

Description

bsd.mkopt.mk: Prepare a list of all build options

After processing all the build options, iterate over the complete list
minus CLEAN, MAN and TESTS, and prepare two variables:

  • SRC_OPT_DEFS is a list of -D and -U directives, suitable for passing to cpp or unifdef, where each option is either defined or undefined depending on whether it is set or unset. This list also includes -D${MACHINE_ARCH}.
  • SRC_OPT_LIST is a list of build options suitable for passing to make itself (or sticking in /etc/src.conf). This list also includes TARGET=${MACHINE} and TARGET_ARCH=${MACHINE_ARCH}.

Note that this list is cumulative, so it includes both options defined
in bsd.opts.mk and options defined in src.opts.mk.

Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D51827

Details

Provenance
desAuthored on Aug 8 2025, 10:18 PM
Reviewer
kevans
Differential Revision
D51827: bsd.mkopt.mk: Prepare a list of all build options
Parents
rGabd45729ab22: mk: Mark buildenv .NOTMAIN
Branches
Unknown
Tags
Unknown