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