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