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