Page MenuHomeFreeBSD

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

Authored by des on Fri, Aug 8, 1:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Aug 24, 7:06 PM
Unknown Object (File)
Sun, Aug 24, 11:19 AM
Unknown Object (File)
Fri, Aug 22, 12:33 PM
Unknown Object (File)
Wed, Aug 20, 8:57 PM
Unknown Object (File)
Wed, Aug 20, 8:10 PM
Unknown Object (File)
Tue, Aug 19, 8:32 AM
Unknown Object (File)
Tue, Aug 19, 1:31 AM
Unknown Object (File)
Mon, Aug 18, 9:42 PM

Details

Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Fri, Aug 8, 1:37 PM
kevans added inline comments.
tools/build/options/makeman
130–131

This will be a bit more annoying for makeman.lua that I'm hoping to switch over to Soon(TM). Do we have an alternative that could export this in some other way than having to post-processing all of this output?

tools/build/options/makeman
130–131

Yeah I just thought of something, hang on...

I like that a lot; thanks!

This revision is now accepted and ready to land.Fri, Aug 8, 9:53 PM