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