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