Recognize the available methods for compiling a customized binary

TODO: should this be renamed s/a customized binary/customized packages/ ?

Author: name contact BSD flavour

Reviewer: name contact BSD flavour

Reviewer: Chris Silva FreeBSD/OpenBSD


Many applications used by servers support make(1) options to compile a binary with the feature set required by a particular installation. While the BSDs all use make(1), the admin should recognize that each BSD uses different mechanisms to use and preserve make(1) options.


FreeBSD Ports

FreeBSD ports (((ports, FreeBSD))) includes a /usr/ports/KNOBS (((knobs))) file that lists commonly-used options with their descriptions. These "knobs" can be used with WITH_* or WITHOUT_* make (((make))) variables, for example: WITH_APACHE2, WITH_ISPELL, and WITHOUT_X11. Some ports honor options like these to override the defaults.

TODO: cover /var/db/ports/portname/options, make showconfig, make rmconfig,

TODO: show examples


Practice Exercises

More information

DragonFly: mk.conf(5)(((mk.conf))) or make.conf(5), PKG_OPTIONS, CFLAGS FreeBSD: -DWITH_* or WITH_*=, pkgtools.conf(5), make.conf(5) NetBSD: PKG_OPTIONS., CFLAGS, mk.conf(5), PKG_DEFAULT_OPTIONS OpenBSD:

Add: /usr/ports/KNOBS