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