xref: /freebsd/usr.sbin/sysconf/sysconf-src.8 (revision b4a465e566a1850e232b454efe99e05c1ea93f67)
1.\" Copyright (c) 2013-2026 Devin Teske <dteske@FreeBSD.org>
2.\" Copyright (c) 2021-2026 Faraz Vahedi <kfv@FreeBSD.org>
3.\"
4.\" SPDX-License-Identifier: BSD-2-Clause
5.\"
6.Dd August 2, 2026
7.Dt SYSCONF-SRC 8
8.Os
9.Sh NAME
10.Nm "sysconf src"
11.Nd configure the src-env.conf / make.conf / src.conf triad
12.Sh SYNOPSIS
13.Nm sysconf
14.Cm src
15.Op Fl ceFinNqsvVx
16.Op Fl j Ar jail | Fl R Ar dir
17.Op Fl f Ar file
18.Ar name Ns Op Ns Oo +|- Oc Ns = Ns Ar value
19.Ar ...
20.Nm sysconf
21.Cm src
22.Op Fl eFnNqvV
23.Op Fl f Ar file
24.Fl a
25.Nm sysconf
26.Cm src
27.Op Fl E
28.Fl l | L
29.Sh DESCRIPTION
30The
31.Cm src
32target of
33.Xr sysconf 8
34is the
35.Pa /usr/src
36build audience:
37it consults the same triad
38.Xr make 1
39uses when building the source tree
40.Po
41.Pa src-env.conf ,
42then
43.Pa make.conf ,
44then
45.Pa src.conf
46.Pc ,
47honoring
48.Ev SRC_ENV_CONF ,
49.Ev __MAKE_CONF ,
50and
51.Ev SRCCONF
52when set.
53See
54.Xr bsdconf_format 3
55and
56.Xr src.conf 5 .
57Shared options are in
58.Xr sysconf 8 ;
59authoritative-file and removal policy in
60.Xr sysconf-targets 8 ;
61.Ql +=
62and
63.Ql -=
64semantics match
65.Xr sysconf-make 8 .
66.Pp
67New directives are written to
68.Pa src.conf
69.Pq or the path in Ev SRCCONF ;
70an existing definition is rewritten in the file that last set it.
71There is no separate
72.Ql src-env
73keyword;
74use
75.Cm src
76or
77.Fl f
78for surgical edits of
79.Pa src-env.conf .
80.Pp
81.Ql WITH_*
82and
83.Ql WITHOUT_*
84are presence knobs
85.Po
86.Xr src.conf 5
87ignores the value; empty
88.Ql name=
89is the preferred spelling
90.Pc .
91Prefer
92.Fl s
93.Ar name
94over
95.Ar name Ns =
96when only presence matters;
97.Fl s
98leaves an already-defined knob
99.Pq any value
100unchanged and echoes
101.Ql (present) (unchanged) .
102An explicit
103.Ar name Ns =
104.Pq including empty
105always writes the requested value, and a change of placeholder echoes
106.Ql name: old -> new .
107.Fl s
108appends to the preferred write file and does not remove an inverse
109.Ql WITH_
110or
111.Ql WITHOUT_
112for the same option.
113Reads show
114.Ql name (present)
115for any assigned value;
116with
117.Fl e ,
118the real assignment
119.Po
120e.g.
121.Ql name=
122or
123.Ql name=t
124.Pc ;
125with
126.Fl n ,
127that same value alone
128.Pq empty when the assignment is Ql name= .
129Writing
130.Ql WITH_ Ns Ar foo Ns =no
131warns as on the
132.Cm make
133target
134.Pq see Xr sysconf-make 8 ;
135.Pa /usr/src
136make evaluates such assignments via
137.Pa bsd.opts.mk
138and
139.Pa src.opts.mk .
140.Pp
141.Va WITHOUT_MODULES
142is not a presence knob:
143its value is a module reject list, so
144.Fl s
145is rejected and reads print the module list rather than
146.Ql (present) .
147Set it with a normal assignment
148.Pq e.g. Va WITHOUT_MODULES Ns = Ns Ar plip .
149.Pp
150This target has no defaults file;
151.Fl d ,
152.Fl D ,
153and
154.Fl A
155are errors.
156.Sh ENVIRONMENT
157.Bl -tag -width "SRC_ENV_CONF"
158.It Ev SRC_ENV_CONF
159Path of
160.Pa src-env.conf
161.Pq default Pa /etc/src-env.conf ;
162verbatim,
163not subject to
164.Fl R .
165.It Ev __MAKE_CONF
166Path of
167.Pa make.conf
168.Pq default Pa /etc/make.conf ;
169verbatim,
170not subject to
171.Fl R .
172.It Ev SRCCONF
173Path of
174.Pa src.conf
175.Pq default Pa /etc/src.conf ;
176verbatim,
177not subject to
178.Fl R .
179Also the preferred write file for new directives.
180.El
181.Sh FILES
182.Bl -tag -width "/etc/src-env.conf" -compact
183.It Pa /etc/src-env.conf
184First file of the triad.
185.It Pa /etc/make.conf
186Middle file of the triad.
187.It Pa /etc/src.conf
188Last file and preferred write target.
189.El
190.Sh EXAMPLES
191.Dl sysconf src -s WITHOUT_LLDB
192.Dl sysconf src WITHOUT_LLDB=
193.Dl sysconf src WITHOUT_LLDB
194.Dl sysconf src -x WITHOUT_LLDB
195.Dl sysconf src -V CFLAGS
196.Sh SEE ALSO
197.Xr make 1 ,
198.Xr bsdconf_format 3 ,
199.Xr src.conf 5 ,
200.Xr sysconf 8 ,
201.Xr sysconf-make 8 ,
202.Xr sysconf-targets 8
203.Sh HISTORY
204The
205.Nm sysconf
206utility first appeared in
207.Fx 16.0 .
208.Sh AUTHORS
209.An Devin Teske Aq Mt dteske@FreeBSD.org
210.An Faraz Vahedi Aq Mt kfv@FreeBSD.org
211