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