xref: /freebsd/share/man/man5/make.conf.5 (revision d485c77f203fb0f4cdc08dea5ff81631b51d8809)
1.\" Copyright (c) 2000
2.\"	Mike W. Meyer
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd December 20, 2020
28.Dt MAKE.CONF 5
29.Os
30.Sh NAME
31.Nm make.conf
32.Nd system build information
33.Sh DESCRIPTION
34The file
35.Nm
36contains system-wide settings that will apply to every build using
37.Xr make 1
38and the standard
39.Pa sys.mk
40file.
41This is achieved as follows:
42.Xr make 1
43processes the system makefile
44.Pa sys.mk
45before any other file by default, and
46.Pa sys.mk
47includes
48.Nm .
49.Pp
50The file
51.Nm
52uses the standard makefile syntax.
53However,
54.Nm
55should not specify any dependencies to
56.Xr make 1 .
57Instead,
58.Nm
59is to set
60.Xr make 1
61variables that control the actions of other makefiles.
62.Pp
63The default location of
64.Nm
65is
66.Pa /etc/make.conf ,
67though an alternative location can be specified in the
68.Xr make 1
69variable
70.Va __MAKE_CONF .
71You may need to override the location of
72.Nm
73if the system-wide settings are not suitable for a particular build.
74For instance, setting
75.Va __MAKE_CONF
76to
77.Pa /dev/null
78effectively resets all build controls to their defaults.
79.Pp
80The primary purpose of
81.Nm
82is to control the compilation of the
83.Fx
84sources, documentation, and ported applications,
85which are usually found in
86.Pa /usr/src ,
87.Pa /usr/doc ,
88and
89.Pa /usr/ports .
90As a rule, the system administrator creates
91.Nm
92when the values of certain control variables need to be changed
93from their defaults.
94.Pp
95The system build procedures occur in four broad areas:
96the world, the kernel, documentation and ports.
97Variables set in
98.Nm
99may be applicable in one, two, or all four of these areas.
100In addition, control variables can be specified
101for a particular build via the
102.Fl D
103option of
104.Xr make 1
105or in
106.Xr environ 7 .
107In the case of world and kernel builds it is possible to put these variables
108into
109.Xr src.conf 5
110instead of
111.Nm .
112This way the environment for documentation and ports builds is not polluted
113by unrelated variables.
114.Pp
115The following lists provide a name and short description for each
116variable you can use during the indicated builds.
117The values of
118variables flagged as
119.Vt bool
120are ignored; the variable being
121set at all (even to
122.Dq Li FALSE
123or
124.Dq Li NO )
125causes it to
126be treated as if it were set.
127.Pp
128The following list provides a name and short description for variables
129that are used for all builds, or are used by the
130.Pa makefiles
131for things other than builds.
132.Bl -tag -width Ar
133.It Va ALWAYS_CHECK_MAKE
134.Pq Vt bool
135Instructs the top-level makefile in the source tree (normally
136.Pa /usr/src )
137to always check if
138.Xr make 1
139is up-to-date.
140Normally this is only done for the world and buildworld targets to handle
141upgrades from older versions of
142.Fx .
143.It Va CFLAGS
144.Pq Vt str
145Controls the compiler setting when compiling C code.
146Optimization levels other than
147.Fl O
148and
149.Fl O2
150are not supported.
151.It Va CPUTYPE
152.Pq Vt str
153Controls which processor should be targeted for generated
154code.
155This controls processor-specific optimizations in
156certain code (currently only OpenSSL) as well as modifying
157the value of
158.Va CFLAGS
159and
160.Va COPTFLAGS
161to contain the appropriate optimization directive to
162.Xr cc 1 .
163The automatic setting of
164.Va CFLAGS
165may be overridden using the
166.Va NO_CPU_CFLAGS
167variable.
168Refer to
169.Pa /usr/share/examples/etc/make.conf
170for a list of recognized
171.Va CPUTYPE
172options.
173.It Va CXXFLAGS
174.Pq Vt str
175Controls the compiler settings when compiling C++ code.
176.Va CXXFLAGS
177is initially set to the value of
178.Va CFLAGS .
179If you want to
180add to the
181.Va CXXFLAGS
182value, use
183.Dq Li +=
184instead of
185.Dq Li = .
186.It Va DTC
187.Pq Vt str
188Select the compiler for DTS (Device Tree Syntax) file.
189.Va DTC
190is initially set to the value of dtc
191.It Va INSTALL
192.Pq Vt str
193the default install command.
194To install only files for which the target differs or does not exist, use
195.Bd -literal -offset indent
196INSTALL+= -C
197.Ed
198Note that some makefiles (including those in
199.Pa /usr/share/mk )
200may hardcode options for the supplied install command.
201.It Va LOCAL_DIRS
202.Pq Vt str
203List any directories that should be entered when doing
204make's in
205.Pa /usr/src
206in this variable.
207.It Va MAKE_SHELL
208.Pq Vt str
209Controls the shell used internally by
210.Xr make 1
211to process the command scripts in makefiles.
212.Xr sh 1 ,
213.Xr ksh 1 ,
214and
215.Xr csh 1
216all currently supported.
217.Pp
218.Dl "MAKE_SHELL?=sh"
219.It Va MTREE_FOLLOWS_SYMLINKS
220.Pq Vt str
221Set this to
222.Dq Fl L
223to cause
224.Xr mtree 8
225to follow symlinks.
226.It Va NO_CPU_CFLAGS
227.Pq Vt str
228Setting this variable will prevent CPU specific compiler flags
229from being automatically added to
230.Va CFLAGS
231during compile time.
232.It Va NO_DOCUPDATE
233.Pq Vt bool
234Set this to not update the doc tree during
235.Dq Li "make update" .
236.It Va NO_PORTSUPDATE
237.Pq Vt bool
238Set this to not update the ports tree during
239.Dq Li "make update" .
240.It Va SVN_UPDATE
241.Pq Vt bool
242Set this to use
243.Xr svn 1
244or
245.Xr svnlite 1
246to update your
247.Pa src
248tree with
249.Dq Li "make update" .
250Note that you can set
251.Va SVN
252to the full path of a
253.Xr svn 1
254binary.
255.El
256.Ss "BUILDING THE KERNEL"
257The following list provides a name and short description for variables
258that are only used doing a kernel build:
259.Bl -tag -width Ar
260.It Va BOOTWAIT
261.Pq Vt int
262Controls the amount of time the kernel waits for a console keypress
263before booting the default kernel.
264The value is approximately milliseconds.
265Keypresses are accepted by the BIOS before booting from disk,
266making it possible to give custom boot parameters even when this is
267set to 0.
268.It Va COPTFLAGS
269.Pq Vt str
270Controls the compiler settings when building the
271kernel.
272Optimization levels above
273.Oo Fl O ( O2 , No ...\& ) Oc
274are not guaranteed to work.
275.It Va KERNCONF
276.Pq Vt str
277Controls which kernel configurations will be
278built by
279.Dq Li "${MAKE} buildkernel"
280and installed by
281.Dq Li "${MAKE} installkernel" .
282For example,
283.Bd -literal -offset indent
284KERNCONF=MINE DEBUG GENERIC OTHERMACHINE
285.Ed
286.Pp
287will build the kernels specified by the config files
288.Pa MINE , DEBUG , GENERIC ,
289and
290.Pa OTHERMACHINE ,
291and install the kernel specified by the config file
292.Pa MINE .
293It defaults to
294.Pa GENERIC .
295.It Va MODULES_OVERRIDE
296.Pq Vt str
297Set to a list of modules to build instead of all of them.
298.It Va NO_KERNELCLEAN
299.Pq Vt bool
300Set this to skip running
301.Dq Li "${MAKE} clean"
302during
303.Dq Li "${MAKE} buildkernel" .
304.It Va NO_KERNELCONFIG
305.Pq Vt bool
306Set this to skip running
307.Xr config 8
308during
309.Dq Li "${MAKE} buildkernel" .
310.It Va NO_KERNELOBJ
311.Pq Vt bool
312Set this to skip running
313.Dq Li "${MAKE} obj"
314during
315.Dq Li "${MAKE} buildkernel" .
316.It Va NO_MODULES
317.Pq Vt bool
318Set to not build modules with the kernel.
319.It Va PORTS_MODULES
320Set this to the list of ports you wish to rebuild every time the kernel
321is built.
322.It Va WITHOUT_MODULES
323.Pq Vt str
324Set to a list of modules to exclude from the build.
325This provides a
326somewhat easier way to exclude modules you are certain you will never
327need than specifying
328.Va MODULES_OVERRIDE .
329This is applied
330.Em after
331.Va MODULES_OVERRIDE .
332.El
333.Ss "BUILDING THE WORLD"
334The following list provides a name and short description for variables
335that are used during the world build:
336.Bl -tag -width Ar
337.It Va BOOT_COMCONSOLE_PORT
338.Pq Vt str
339The port address to use for the console if the boot blocks have
340been configured to use a serial console instead of the keyboard/video card.
341.It Va BOOT_COMCONSOLE_SPEED
342.Pq Vt int
343The baud rate to use for the console if the boot blocks have
344been configured to use a serial console instead of the keyboard/video card.
345.It Va BOOT_PXELDR_ALWAYS_SERIAL
346.Pq Vt bool
347Compile in the code into
348.Xr pxeboot 8
349that forces the use of a serial console.
350This is analogous to the
351.Fl h
352option in
353.Xr boot 8
354blocks.
355.It Va BOOT_PXELDR_PROBE_KEYBOARD
356.Pq Vt bool
357Compile in the code into
358.Xr pxeboot 8
359that probes the keyboard.
360If no keyboard is found, boot with the dual console configuration.
361This is analogous to the
362.Fl D
363option in
364.Xr boot 8
365blocks.
366.It Va ENABLE_SUID_K5SU
367.Pq Vt bool
368Set this if you wish to use the ksu utility.
369Otherwise, it will be
370installed without the set-user-ID bit set.
371.It Va ENABLE_SUID_NEWGRP
372.Pq Vt bool
373Set this to install
374.Xr newgrp 1
375with the set-user-ID bit set.
376Otherwise,
377.Xr newgrp 1
378will not be able to change users' groups.
379.It Va LOADER_TFTP_SUPPORT
380.Pq Vt bool
381By default the
382.Xr pxeboot 8
383loader retrieves the kernel via NFS.
384Defining this and recompiling
385.Pa /usr/src/stand
386will cause it to retrieve the kernel via TFTP.
387This allows
388.Xr pxeboot 8
389to load a custom BOOTP diskless kernel yet
390still mount the server's
391.Pa /
392rather than load the server's kernel.
393.It Va LOADER_FIREWIRE_SUPPORT
394.Pq Vt bool
395Defining this and recompiling
396.Pa /usr/src/stand/i386
397will add
398.Xr dcons 4
399console driver to
400.Xr loader 8
401and allow access over FireWire(IEEE1394) using
402.Xr dconschat 8 .
403Currently, only i386 and amd64 are supported.
404.It Va MAN_ARCH
405.Pq Vt str
406Space-delimited list of one or more MACHINE and/or MACHINE_ARCH values
407for which section 4 man pages will be installed.
408The special value
409.Sq all
410installs all available architectures.
411The default is the MACHINE and MACHINE_ARCH being built.
412.It Va MODULES_WITH_WORLD
413.Pq Vt bool
414Set to build modules with the system instead of the kernel.
415.It Va NO_CLEAN
416.Pq Vt bool
417Set this to disable cleaning during
418.Dq Li "make buildworld" .
419This should not be set unless you know what you are doing.
420.It Va NO_CLEANDIR
421.Pq Vt bool
422Set this to run
423.Dq Li "${MAKE} clean"
424instead of
425.Dq Li "${MAKE} cleandir" .
426.It Va WITH_MANCOMPRESS
427.Pq Vt defined
428Set to install manual pages compressed.
429.It Va WITHOUT_MANCOMPRESS
430.Pq Vt defined
431Set to install manual pages uncompressed.
432.It Va NO_SHARE
433.Pq Vt bool
434Set to not build in the
435.Pa share
436subdir.
437.It Va NO_SHARED
438.Pq Vt bool
439Set to build
440.Pa /bin
441and
442.Pa /sbin
443statically linked, this can be bad.
444If set, every utility that uses
445.Pa bsd.prog.mk
446will be linked statically.
447.It Va PKG_REPO_SIGNING_KEY
448.Pq Vt str
449Path to rsa private key passed to
450.Xr pkg-repo 8
451to sign packages created when building the
452.Ar packages
453target, i.e.: pkgbase.
454The variable is named the same in
455.Xr poudriere 8
456so it will automatically be picked up when building pkgbase with poudriere.
457.It Va PPP_NO_NAT
458.Pq Vt bool
459Build
460.Xr ppp 8
461without support for network address translation (NAT).
462.It Va PPP_NO_NETGRAPH
463.Pq Vt bool
464Set to build
465.Xr ppp 8
466without support for Netgraph.
467.It Va PPP_NO_RADIUS
468.Pq Vt bool
469Set to build
470.Xr ppp 8
471without support for RADIUS.
472.It Va PPP_NO_SUID
473.Pq Vt bool
474Set to disable the installation of
475.Xr ppp 8
476as a set-user-ID root program.
477.It Va SENDMAIL_ADDITIONAL_MC
478.Pq Vt str
479Additional
480.Pa .mc
481files which should be built into
482.Pa .cf
483files at build time.
484The value should include the full path to the
485.Pa .mc
486file(s), e.g.,
487.Pa /etc/mail/foo.mc ,
488.Pa /etc/mail/bar.mc .
489.It Va SENDMAIL_ALIASES
490.Pq Vt str
491List of
492.Xr aliases 5
493files to rebuild when using
494.Pa /etc/mail/Makefile .
495The default value is
496.Pa /etc/mail/aliases .
497.It Va SENDMAIL_CFLAGS
498.Pq Vt str
499Flags to pass to the compile command when building
500.Xr sendmail 8 .
501The
502.Va SENDMAIL_*
503flags can be used to provide SASL support with setting such as:
504.Bd -literal -offset indent
505SENDMAIL_CFLAGS=-I/usr/local/include -DSASL
506SENDMAIL_LDFLAGS=-L/usr/local/lib
507SENDMAIL_LDADD=-lsasl
508.Ed
509.It Va SENDMAIL_CF_DIR
510.Pq Vt str
511Override the default location for the
512.Xr m4 1
513configuration files used to build a
514.Pa .cf
515file from a
516.Pa .mc
517file.
518.It Va SENDMAIL_DPADD
519.Pq Vt str
520Extra dependencies to add when building
521.Xr sendmail 8 .
522.It Va SENDMAIL_LDADD
523.Pq Vt str
524Flags to add to the end of the
525.Xr ld 1
526command when building
527.Xr sendmail 8 .
528.It Va SENDMAIL_LDFLAGS
529.Pq Vt str
530Flags to pass to the
531.Xr ld 1
532command when building
533.Xr sendmail 8 .
534.It Va SENDMAIL_M4_FLAGS
535.Pq Vt str
536Flags passed to
537.Xr m4 1
538when building a
539.Pa .cf
540file from a
541.Pa .mc
542file.
543.It Va SENDMAIL_MAP_PERMS
544.Pq Vt str
545Mode to use when generating alias and map database files using
546.Pa /etc/mail/Makefile .
547The default value is 0640.
548.It Va SENDMAIL_MAP_SRC
549.Pq Vt str
550Additional maps to rebuild when using
551.Pa /etc/mail/Makefile .
552The
553.Pa access ,
554.Pa bitdomain ,
555.Pa domaintable ,
556.Pa genericstable ,
557.Pa mailertable ,
558.Pa uucpdomain ,
559and
560.Pa virtusertable
561maps are always rebuilt if they exist.
562.It Va SENDMAIL_MAP_TYPE
563.Pq Vt str
564Database map type to use when generating map database files using
565.Pa /etc/mail/Makefile .
566The default value is hash.
567The alternative is btree.
568.It Va SENDMAIL_MC
569.Pq Vt str
570The default
571.Xr m4 1
572configuration file to use at install time.
573The value should include the full path to the
574.Pa .mc
575file, e.g.,
576.Pa /etc/mail/myconfig.mc .
577Use with caution as a make install will overwrite any existing
578.Pa /etc/mail/sendmail.cf .
579Note that
580.Va SENDMAIL_CF
581is deprecated.
582.It Va SENDMAIL_SET_USER_ID
583.Pq Vt bool
584If set, install
585.Xr sendmail 8
586as a set-user-ID root binary instead of a set-group-ID binary
587and do not install
588.Pa /etc/mail/submit.{cf,mc} .
589Use of this flag is not recommended and the alternative advice in
590.Pa /etc/mail/README
591should be followed instead if at all possible.
592.It Va SENDMAIL_START_SCRIPT
593.Pq Vt str
594The script used by
595.Pa /etc/mail/Makefile
596to start, stop, and restart
597.Xr sendmail 8 .
598The default value is
599.Pa /etc/rc.sendmail .
600This value should match the
601.Dq Li mta_start_script
602setting in
603.Xr rc.conf 5 .
604.It Va SENDMAIL_SUBMIT_MC
605.Pq Vt str
606The default
607.Xr m4 1
608configuration file for mail submission
609to use at install time.
610The value should include the full path to the
611.Pa .mc
612file, e.g.,
613.Pa /etc/mail/mysubmit.mc .
614Use with caution as a make install will overwrite any existing
615.Pa /etc/mail/submit.cf .
616.It Va TOP_TABLE_SIZE
617.Pq Vt int
618.Xr top 1
619uses a hash table for the user names.
620The size of this hash can be tuned to match the number of local users.
621The table size should be a prime number
622approximately twice as large as the number of lines in
623.Pa /etc/passwd .
624The default number is 20011.
625.It Va WANT_FORCE_OPTIMIZATION_DOWNGRADE
626.Pq Vt int
627Causes the system compiler to be built such that it forces high optimization
628levels to a lower one.
629.Xr cc 1
630.Fl O2
631and above is known to trigger known optimizer bugs at various
632times.
633The value assigned is the highest optimization value used.
634.El
635.Ss "BUILDING DOCUMENTATION"
636The following list provides a name and short description for variables
637that are used when building documentation.
638.Bl -tag -width ".Va PRINTERDEVICE"
639.It Va DISTDIR
640.Pq Vt str
641Where distfiles are kept.
642Normally, this is
643.Pa distfiles
644in
645.Va PORTSDIR .
646.It Va DOC_LANG
647.Pq Vt str
648The list of languages and encodings to build and install.
649.It Va PRINTERDEVICE
650.Pq Vt str
651The default format for system documentation, depends on your
652printer.
653This can be set to
654.Dq Li ascii
655for simple printers, or
656.Dq Li ps
657for postscript or graphics printers with a ghostscript
658filter, or both.
659.El
660.Ss "BUILDING PORTS"
661Several make variables can be set that affect the building of ports.
662These variables and their effects are documented in
663.Xr ports 7 ,
664.Pa ${PORTSDIR}/Mk/*
665and the
666.Fx
667Porter's Handbook.
668.Sh FILES
669.Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact
670.It Pa /etc/make.conf
671.It Pa /usr/doc/Makefile
672.It Pa /usr/ports/Makefile
673.It Pa /usr/share/examples/etc/make.conf
674.It Pa /usr/share/mk/sys.mk
675.It Pa /usr/src/Makefile
676.It Pa /usr/src/Makefile.inc1
677.El
678.Sh SEE ALSO
679.Xr cc 1 ,
680.Xr install 1 ,
681.Xr make 1 ,
682.Xr src.conf 5 ,
683.Xr style.Makefile 5 ,
684.Xr environ 7 ,
685.Xr ports 7 ,
686.Xr sendmail 8
687.Sh HISTORY
688The
689.Nm
690file appeared sometime before
691.Fx 4.0 .
692.Sh AUTHORS
693This
694manual page was written by
695.An Mike W. Meyer Aq Mt mwm@mired.org .
696.Sh CAVEATS
697Note, that
698.Ev MAKEOBJDIRPREFIX
699and
700.Ev MAKEOBJDIR
701are environment variables and should not be set in
702.Nm
703or as command line arguments to
704.Xr make 1 ,
705but in make's environment.
706.Sh BUGS
707This manual page may occasionally be out of date with respect to
708the options currently available for use in
709.Nm .
710Please check the
711.Pa /usr/share/examples/etc/make.conf
712file for the latest options which are available.
713