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