NAME
sysconf make – configure make.conf directives
SYNOPSIS
sysconf make [-ceFinNqsvVx] [-j jail | -R dir] [-f file] name[[+|-]=value] ...
sysconf make [-eFnNqvV] [-f file] -a
sysconf make [-E] -l | -L
DESCRIPTION
The make target of sysconf(8) reads and writes make(1)-syntax configuration on /etc/make.conf by default, or on any single file named with -f. Shared options are in sysconf(8); make(1) limitations and multi-file policy for other targets in sysconf-targets(8).
‘+=’ is the make(1) append operator: a new ‘name+=value’ line is appended (prior assignments for the same name are left intact), and reads report the cumulative effective value as make -V would. Assignment modifiers may also be requested by suffixing the name, as in ‘CFLAGS+=-DDEBUG’.
‘-=’ is not a make(1) operator; it strikes each given word from the last assignment whose value contains that word as a whole whitespace-separated token (rewriting the statement, or deleting it when the value becomes empty), so successive strikes peel list fragments from the end of the assignment chain without collapsing earlier ‘+=’ lines.
‘WITH_*’ and ‘WITHOUT_*’ presence knobs may be set with -s (preferred; writes ‘name=’) or name=; reads report ‘name (present)’ for any assigned value( -e prints the real assignment, e.g. ‘name=’ or ‘name=t’; -n prints that same value alone). -s is a no-op when the knob is already defined (any value); an explicit name= (including empty) always writes, and a change of placeholder echoes ‘name: old -> new’. -s does not clear an inverse ‘WITH_’ or ‘WITHOUT_’ for the same option( use -V and clean up manually if needed).
Writing ‘WITH_foo=no’ (exact lowercase ‘no’) still stores the assignment but warns to use ‘WITHOUT_foo=1’, matching the ‘.warning’ in share/mk/bsd.mkopt.mk. sysconf make emits that advisory on write and on read (named queries and -a), with ‘file:line:’ of the authoritative statement when known (suppressed by -q), because make.conf(5) is read by /usr/src builds: a line such as WITH_MANCOMPRESS=no here is what produces
warning: Use WITHOUT_MANCOMPRESS=1 instead of WITH_MANCOMPRESS=no
when running make(1) in /usr/src (after bsd.opts.mk reloads bsd.mkopt.mk for common options). The read-time form matters when the default presence display hides the ‘=no’ value behind ‘(present)’. The same line stays silent under a bare ‘make -C /tmp’ or ports, which never evaluate that option list. Neither sysconf make nor make warns for ‘WITHOUT_*=no’ or ‘WITH_*=NO’: presence of ‘WITHOUT_’ still disables, and ‘WITH_’ with a value other than lowercase ‘no’ does not match the check.
WITHOUT_MODULES is not a presence knob: its value is a module reject list, so -s is rejected and reads print the module list rather than ‘(present)’. Set it with a normal assignment (e.g. WITHOUT_MODULES=plip).
This target has no defaults file; -d, -D, and -A are errors. For the /usr/src build triad see sysconf-src(8).
FILES
- /etc/make.conf
-
Default file for the make target.
EXAMPLES
sysconf make CFLAGS+=-DDEBUG
sysconf make -s WITHOUT_MANCOMPRESS
sysconf make WITHOUT_MANCOMPRESS
Strike a word from the last ‘+=’ fragment that contains it (here removing ‘3 from the final line only’):
bar+=1 bar+=1 2 bar+=1 2 3
sysconf make bar-=3
leaves ‘bar+=1 2’ on the last line. Repeating with ‘bar-=2’ and ‘bar-=1’ peels that line further, then removes it when emptied.
SEE ALSO
HISTORY
The sysconf utility first appeared in FreeBSD 16.0.
AUTHORS
Devin Teske ⟨[email protected]⟩ Faraz Vahedi ⟨[email protected]⟩