]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man5/make.conf.5
Fix a few mandoc issues
[FreeBSD/FreeBSD.git] / share / man / man5 / make.conf.5
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 27, 2018
28 .Dt MAKE.CONF 5
29 .Os
30 .Sh NAME
31 .Nm make.conf
32 .Nd system build information
33 .Sh DESCRIPTION
34 The file
35 .Nm
36 contains system-wide settings that will apply to every build using
37 .Xr make 1
38 and the standard
39 .Pa sys.mk
40 file.
41 This is achieved as follows:
42 .Xr make 1
43 processes the system makefile
44 .Pa sys.mk
45 before any other file by default, and
46 .Pa sys.mk
47 includes
48 .Nm .
49 .Pp
50 The file
51 .Nm
52 uses the standard makefile syntax.
53 However,
54 .Nm
55 should not specify any dependencies to
56 .Xr make 1 .
57 Instead,
58 .Nm
59 is to set
60 .Xr make 1
61 variables that control the actions of other makefiles.
62 .Pp
63 The default location of
64 .Nm
65 is
66 .Pa /etc/make.conf ,
67 though an alternative location can be specified in the
68 .Xr make 1
69 variable
70 .Va __MAKE_CONF .
71 You may need to override the location of
72 .Nm
73 if the system-wide settings are not suitable for a particular build.
74 For instance, setting
75 .Va __MAKE_CONF
76 to
77 .Pa /dev/null
78 effectively resets all build controls to their defaults.
79 .Pp
80 The primary purpose of
81 .Nm
82 is to control the compilation of the
83 .Fx
84 sources, documentation, and ported applications,
85 which are usually found in
86 .Pa /usr/src ,
87 .Pa /usr/doc ,
88 and
89 .Pa /usr/ports .
90 As a rule, the system administrator creates
91 .Nm
92 when the values of certain control variables need to be changed
93 from their defaults.
94 .Pp
95 The system build procedures occur in four broad areas:
96 the world, the kernel, documentation and ports.
97 Variables set in
98 .Nm
99 may be applicable in one, two, or all four of these areas.
100 In addition, control variables can be specified
101 for a particular build via the
102 .Fl D
103 option of
104 .Xr make 1
105 or in
106 .Xr environ 7 .
107 In the case of world and kernel builds it is possible to put these variables
108 into
109 .Xr src.conf 5
110 instead of
111 .Nm .
112 This way the environment for documentation and ports builds is not polluted
113 by unrelated variables.
114 .Pp
115 The following lists provide a name and short description for each
116 variable you can use during the indicated builds.
117 The values of
118 variables flagged as
119 .Vt bool
120 are ignored; the variable being
121 set at all (even to
122 .Dq Li FALSE
123 or
124 .Dq Li NO )
125 causes it to
126 be treated as if it were set.
127 .Pp
128 The following list provides a name and short description for variables
129 that are used for all builds, or are used by the
130 .Pa makefiles
131 for things other than builds.
132 .Bl -tag -width Ar
133 .It Va ALWAYS_CHECK_MAKE
134 .Pq Vt bool
135 Instructs the top-level makefile in the source tree (normally
136 .Pa /usr/src )
137 to always check if
138 .Xr make 1
139 is up-to-date.
140 Normally this is only done for the world and buildworld targets to handle
141 upgrades from older versions of
142 .Fx .
143 .It Va CFLAGS
144 .Pq Vt str
145 Controls the compiler setting when compiling C code.
146 Optimization levels other than
147 .Fl O
148 and
149 .Fl O2
150 are not supported.
151 .It Va CPUTYPE
152 .Pq Vt str
153 Controls which processor should be targeted for generated
154 code.
155 This controls processor-specific optimizations in
156 certain code (currently only OpenSSL) as well as modifying
157 the value of
158 .Va CFLAGS
159 and
160 .Va COPTFLAGS
161 to contain the appropriate optimization directive to
162 .Xr cc 1 .
163 The automatic setting of
164 .Va CFLAGS
165 may be overridden using the
166 .Va NO_CPU_CFLAGS
167 variable.
168 Refer to
169 .Pa /usr/share/examples/etc/make.conf
170 for a list of recognized
171 .Va CPUTYPE
172 options.
173 .It Va CXXFLAGS
174 .Pq Vt str
175 Controls the compiler settings when compiling C++ code.
176 .Va CXXFLAGS
177 is initially set to the value of
178 .Va CFLAGS .
179 If you want to
180 add to the
181 .Va CXXFLAGS
182 value, use
183 .Dq Li +=
184 instead of
185 .Dq Li = .
186 .It Va DTC
187 .Pq Vt str
188 Select the compiler for DTS (Device Tree Syntax) file.
189 .Va DTC
190 is initially set to the value of dtc
191 .It Va INSTALL
192 .Pq Vt str
193 the default install command.
194 To install only files for which the target differs or does not exist, use
195 .Bd -literal -offset indent
196 INSTALL+= -C
197 .Ed
198 Note that some makefiles (including those in
199 .Pa /usr/share/mk )
200 may hardcode options for the supplied install command.
201 .It Va LOCAL_DIRS
202 .Pq Vt str
203 List any directories that should be entered when doing
204 make's in
205 .Pa /usr/src
206 in this variable.
207 .It Va MAKE_SHELL
208 .Pq Vt str
209 Controls the shell used internally by
210 .Xr make 1
211 to process the command scripts in makefiles.
212 .Xr sh 1 ,
213 .Xr ksh 1 ,
214 and
215 .Xr csh 1
216 all currently supported.
217 .Pp
218 .Dl "MAKE_SHELL?=sh"
219 .It Va MTREE_FOLLOWS_SYMLINKS
220 .Pq Vt str
221 Set this to
222 .Dq Fl L
223 to cause
224 .Xr mtree 8
225 to follow symlinks.
226 .It Va NO_CPU_CFLAGS
227 .Pq Vt str
228 Setting this variable will prevent CPU specific compiler flags
229 from being automatically added to
230 .Va CFLAGS
231 during compile time.
232 .It Va NO_DOCUPDATE
233 .Pq Vt bool
234 Set this to not update the doc tree during
235 .Dq Li "make update" .
236 .It Va NO_PORTSUPDATE
237 .Pq Vt bool
238 Set this to not update the ports tree during
239 .Dq Li "make update" .
240 .It Va SVN_UPDATE
241 .Pq Vt bool
242 Set this to use
243 .Xr svn 1
244 or
245 .Xr svnlite 1
246 to update your
247 .Pa src
248 tree with
249 .Dq Li "make update" .
250 Note that you can set
251 .Va SVN
252 to the full path of a
253 .Xr svn 1
254 binary.
255 .El
256 .Ss "BUILDING THE KERNEL"
257 The following list provides a name and short description for variables
258 that are only used doing a kernel build:
259 .Bl -tag -width Ar
260 .It Va BOOTWAIT
261 .Pq Vt int
262 Controls the amount of time the kernel waits for a console keypress
263 before booting the default kernel.
264 The value is approximately milliseconds.
265 Keypresses are accepted by the BIOS before booting from disk,
266 making it possible to give custom boot parameters even when this is
267 set to 0.
268 .It Va COPTFLAGS
269 .Pq Vt str
270 Controls the compiler settings when building the
271 kernel.
272 Optimization levels above
273 .Oo Fl O ( O2 , No ...\& ) Oc
274 are not guaranteed to work.
275 .It Va KERNCONF
276 .Pq Vt str
277 Controls which kernel configurations will be
278 built by
279 .Dq Li "${MAKE} buildkernel"
280 and installed by
281 .Dq Li "${MAKE} installkernel" .
282 For example,
283 .Bd -literal -offset indent
284 KERNCONF=MINE DEBUG GENERIC OTHERMACHINE
285 .Ed
286 .Pp
287 will build the kernels specified by the config files
288 .Pa MINE , DEBUG , GENERIC ,
289 and
290 .Pa OTHERMACHINE ,
291 and install the kernel specified by the config file
292 .Pa MINE .
293 It defaults to
294 .Pa GENERIC .
295 .It Va MODULES_OVERRIDE
296 .Pq Vt str
297 Set to a list of modules to build instead of all of them.
298 .It Va NO_KERNELCLEAN
299 .Pq Vt bool
300 Set this to skip running
301 .Dq Li "${MAKE} clean"
302 during
303 .Dq Li "${MAKE} buildkernel" .
304 .It Va NO_KERNELCONFIG
305 .Pq Vt bool
306 Set this to skip running
307 .Xr config 8
308 during
309 .Dq Li "${MAKE} buildkernel" .
310 .It Va NO_KERNELOBJ
311 .Pq Vt bool
312 Set this to skip running
313 .Dq Li "${MAKE} obj"
314 during
315 .Dq Li "${MAKE} buildkernel" .
316 .It Va NO_MODULES
317 .Pq Vt bool
318 Set to not build modules with the kernel.
319 .It Va PORTS_MODULES
320 Set this to the list of ports you wish to rebuild every time the kernel
321 is built.
322 .It Va WITHOUT_MODULES
323 .Pq Vt str
324 Set to a list of modules to exclude from the build.
325 This provides a
326 somewhat easier way to exclude modules you are certain you will never
327 need than specifying
328 .Va MODULES_OVERRIDE .
329 This is applied
330 .Em after
331 .Va MODULES_OVERRIDE .
332 .El
333 .Ss "BUILDING THE WORLD"
334 The following list provides a name and short description for variables
335 that are used during the world build:
336 .Bl -tag -width Ar
337 .It Va BOOT_COMCONSOLE_PORT
338 .Pq Vt str
339 The port address to use for the console if the boot blocks have
340 been configured to use a serial console instead of the keyboard/video card.
341 .It Va BOOT_COMCONSOLE_SPEED
342 .Pq Vt int
343 The baud rate to use for the console if the boot blocks have
344 been configured to use a serial console instead of the keyboard/video card.
345 .It Va BOOT_PXELDR_ALWAYS_SERIAL
346 .Pq Vt bool
347 Compile in the code into
348 .Xr pxeboot 8
349 that forces the use of a serial console.
350 This is analogous to the
351 .Fl h
352 option in
353 .Xr boot 8
354 blocks.
355 .It Va BOOT_PXELDR_PROBE_KEYBOARD
356 .Pq Vt bool
357 Compile in the code into
358 .Xr pxeboot 8
359 that probes the keyboard.
360 If no keyboard is found, boot with the dual console configuration.
361 This is analogous to the
362 .Fl D
363 option in
364 .Xr boot 8
365 blocks.
366 .It Va ENABLE_SUID_K5SU
367 .Pq Vt bool
368 Set this if you wish to use the ksu utility.
369 Otherwise, it will be
370 installed without the set-user-ID bit set.
371 .It Va ENABLE_SUID_NEWGRP
372 .Pq Vt bool
373 Set this to install
374 .Xr newgrp 1
375 with the set-user-ID bit set.
376 Otherwise,
377 .Xr newgrp 1
378 will not be able to change users' groups.
379 .It Va LOADER_TFTP_SUPPORT
380 .Pq Vt bool
381 By default the
382 .Xr pxeboot 8
383 loader retrieves the kernel via NFS.
384 Defining this and recompiling
385 .Pa /usr/src/stand
386 will cause it to retrieve the kernel via TFTP.
387 This allows
388 .Xr pxeboot 8
389 to load a custom BOOTP diskless kernel yet
390 still mount the server's
391 .Pa /
392 rather than load the server's kernel.
393 .It Va LOADER_FIREWIRE_SUPPORT
394 .Pq Vt bool
395 Defining this and recompiling
396 .Pa /usr/src/stand/i386
397 will add
398 .Xr dcons 4
399 console driver to
400 .Xr loader 8
401 and allow access over FireWire(IEEE1394) using
402 .Xr dconschat 8 .
403 Currently, only i386 and amd64 are supported.
404 .It Va MAN_ARCH
405 .Pq Vt str
406 Space-delimited list of one or more MACHINE and/or MACHINE_ARCH values
407 for which section 4 man pages will be installed.
408 The special value
409 .Sq all
410 installs all available architectures.
411 The default is the MACHINE and MACHINE_ARCH being built.
412 .It Va MODULES_WITH_WORLD
413 .Pq Vt bool
414 Set to build modules with the system instead of the kernel.
415 .It Va NO_CLEAN
416 .Pq Vt bool
417 Set this to disable cleaning during
418 .Dq Li "make buildworld" .
419 This should not be set unless you know what you are doing.
420 .It Va NO_CLEANDIR
421 .Pq Vt bool
422 Set this to run
423 .Dq Li "${MAKE} clean"
424 instead of
425 .Dq Li "${MAKE} cleandir" .
426 .It Va WITH_MANCOMPRESS
427 .Pq Vt defined
428 Set to install manual pages compressed.
429 .It Va WITHOUT_MANCOMPRESS
430 .Pq Vt defined
431 Set to install manual pages uncompressed.
432 .It Va NO_SHARE
433 .Pq Vt bool
434 Set to not build in the
435 .Pa share
436 subdir.
437 .It Va NO_SHARED
438 .Pq Vt bool
439 Set to build
440 .Pa /bin
441 and
442 .Pa /sbin
443 statically linked, this can be bad.
444 If set, every utility that uses
445 .Pa bsd.prog.mk
446 will be linked statically.
447 .It Va PPP_NO_NAT
448 .Pq Vt bool
449 Build
450 .Xr ppp 8
451 without support for network address translation (NAT).
452 .It Va PPP_NO_NETGRAPH
453 .Pq Vt bool
454 Set to build
455 .Xr ppp 8
456 without support for Netgraph.
457 .It Va PPP_NO_RADIUS
458 .Pq Vt bool
459 Set to build
460 .Xr ppp 8
461 without support for RADIUS.
462 .It Va PPP_NO_SUID
463 .Pq Vt bool
464 Set to disable the installation of
465 .Xr ppp 8
466 as a set-user-ID root program.
467 .It Va SENDMAIL_ADDITIONAL_MC
468 .Pq Vt str
469 Additional
470 .Pa .mc
471 files which should be built into
472 .Pa .cf
473 files at build time.
474 The value should include the full path to the
475 .Pa .mc
476 file(s), e.g.,
477 .Pa /etc/mail/foo.mc ,
478 .Pa /etc/mail/bar.mc .
479 .It Va SENDMAIL_ALIASES
480 .Pq Vt str
481 List of
482 .Xr aliases 5
483 files to rebuild when using
484 .Pa /etc/mail/Makefile .
485 The default value is
486 .Pa /etc/mail/aliases .
487 .It Va SENDMAIL_CFLAGS
488 .Pq Vt str
489 Flags to pass to the compile command when building
490 .Xr sendmail 8 .
491 The
492 .Va SENDMAIL_*
493 flags can be used to provide SASL support with setting such as:
494 .Bd -literal -offset indent
495 SENDMAIL_CFLAGS=-I/usr/local/include -DSASL
496 SENDMAIL_LDFLAGS=-L/usr/local/lib
497 SENDMAIL_LDADD=-lsasl
498 .Ed
499 .It Va SENDMAIL_CF_DIR
500 .Pq Vt str
501 Override the default location for the
502 .Xr m4 1
503 configuration files used to build a
504 .Pa .cf
505 file from a
506 .Pa .mc
507 file.
508 .It Va SENDMAIL_DPADD
509 .Pq Vt str
510 Extra dependencies to add when building
511 .Xr sendmail 8 .
512 .It Va SENDMAIL_LDADD
513 .Pq Vt str
514 Flags to add to the end of the
515 .Xr ld 1
516 command when building
517 .Xr sendmail 8 .
518 .It Va SENDMAIL_LDFLAGS
519 .Pq Vt str
520 Flags to pass to the
521 .Xr ld 1
522 command when building
523 .Xr sendmail 8 .
524 .It Va SENDMAIL_M4_FLAGS
525 .Pq Vt str
526 Flags passed to
527 .Xr m4 1
528 when building a
529 .Pa .cf
530 file from a
531 .Pa .mc
532 file.
533 .It Va SENDMAIL_MAP_PERMS
534 .Pq Vt str
535 Mode to use when generating alias and map database files using
536 .Pa /etc/mail/Makefile .
537 The default value is 0640.
538 .It Va SENDMAIL_MAP_SRC
539 .Pq Vt str
540 Additional maps to rebuild when using
541 .Pa /etc/mail/Makefile .
542 The
543 .Pa access ,
544 .Pa bitdomain ,
545 .Pa domaintable ,
546 .Pa genericstable ,
547 .Pa mailertable ,
548 .Pa uucpdomain ,
549 and
550 .Pa virtusertable
551 maps are always rebuilt if they exist.
552 .It Va SENDMAIL_MAP_TYPE
553 .Pq Vt str
554 Database map type to use when generating map database files using
555 .Pa /etc/mail/Makefile .
556 The default value is hash.
557 The alternative is btree.
558 .It Va SENDMAIL_MC
559 .Pq Vt str
560 The default
561 .Xr m4 1
562 configuration file to use at install time.
563 The value should include the full path to the
564 .Pa .mc
565 file, e.g.,
566 .Pa /etc/mail/myconfig.mc .
567 Use with caution as a make install will overwrite any existing
568 .Pa /etc/mail/sendmail.cf .
569 Note that
570 .Va SENDMAIL_CF
571 is deprecated.
572 .It Va SENDMAIL_SET_USER_ID
573 .Pq Vt bool
574 If set, install
575 .Xr sendmail 8
576 as a set-user-ID root binary instead of a set-group-ID binary
577 and do not install
578 .Pa /etc/mail/submit.{cf,mc} .
579 Use of this flag is not recommended and the alternative advice in
580 .Pa /etc/mail/README
581 should be followed instead if at all possible.
582 .It Va SENDMAIL_START_SCRIPT
583 .Pq Vt str
584 The script used by
585 .Pa /etc/mail/Makefile
586 to start, stop, and restart
587 .Xr sendmail 8 .
588 The default value is
589 .Pa /etc/rc.sendmail .
590 This value should match the
591 .Dq Li mta_start_script
592 setting in
593 .Xr rc.conf 5 .
594 .It Va SENDMAIL_SUBMIT_MC
595 .Pq Vt str
596 The default
597 .Xr m4 1
598 configuration file for mail submission
599 to use at install time.
600 The value should include the full path to the
601 .Pa .mc
602 file, e.g.,
603 .Pa /etc/mail/mysubmit.mc .
604 Use with caution as a make install will overwrite any existing
605 .Pa /etc/mail/submit.cf .
606 .It Va TOP_TABLE_SIZE
607 .Pq Vt int
608 .Xr top 1
609 uses a hash table for the user names.
610 The size of this hash can be tuned to match the number of local users.
611 The table size should be a prime number
612 approximately twice as large as the number of lines in
613 .Pa /etc/passwd .
614 The default number is 20011.
615 .It Va WANT_FORCE_OPTIMIZATION_DOWNGRADE
616 .Pq Vt int
617 Causes the system compiler to be built such that it forces high optimization
618 levels to a lower one.
619 .Xr cc 1
620 .Fl O2
621 and above is known to trigger known optimizer bugs at various
622 times.
623 The value assigned is the highest optimization value used.
624 .El
625 .Ss "BUILDING DOCUMENTATION"
626 The following list provides a name and short description for variables
627 that are used when building documentation.
628 .Bl -tag -width ".Va PRINTERDEVICE"
629 .It Va DISTDIR
630 .Pq Vt str
631 Where distfiles are kept.
632 Normally, this is
633 .Pa distfiles
634 in
635 .Va PORTSDIR .
636 .It Va DOC_LANG
637 .Pq Vt str
638 The list of languages and encodings to build and install.
639 .It Va PRINTERDEVICE
640 .Pq Vt str
641 The default format for system documentation, depends on your
642 printer.
643 This can be set to
644 .Dq Li ascii
645 for simple printers, or
646 .Dq Li ps
647 for postscript or graphics printers with a ghostscript
648 filter, or both.
649 .El
650 .Ss "BUILDING PORTS"
651 Several make variables can be set that affect the building of ports.
652 These variables and their effects are documented in
653 .Xr ports 7 ,
654 .Pa ${PORTSDIR}/Mk/*
655 and the
656 .Fx
657 Porter's Handbook.
658 .Sh FILES
659 .Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact
660 .It Pa /etc/make.conf
661 .It Pa /usr/doc/Makefile
662 .It Pa /usr/ports/Makefile
663 .It Pa /usr/share/examples/etc/make.conf
664 .It Pa /usr/share/mk/sys.mk
665 .It Pa /usr/src/Makefile
666 .It Pa /usr/src/Makefile.inc1
667 .El
668 .Sh SEE ALSO
669 .Xr cc 1 ,
670 .Xr install 1 ,
671 .Xr make 1 ,
672 .Xr src.conf 5 ,
673 .Xr style.Makefile 5 ,
674 .Xr environ 7 ,
675 .Xr ports 7 ,
676 .Xr sendmail 8
677 .Sh HISTORY
678 The
679 .Nm
680 file appeared sometime before
681 .Fx 4.0 .
682 .Sh AUTHORS
683 This
684 manual page was written by
685 .An Mike W. Meyer Aq Mt mwm@mired.org .
686 .Sh CAVEATS
687 Note, that
688 .Ev MAKEOBJDIRPREFIX
689 and
690 .Ev MAKEOBJDIR
691 are environment variables and should not be set in
692 .Nm
693 or as command line arguments to
694 .Xr make 1 ,
695 but in make's environment.
696 .Sh BUGS
697 This manual page may occasionally be out of date with respect to
698 the options currently available for use in
699 .Nm .
700 Please check the
701 .Pa /usr/share/examples/etc/make.conf
702 file for the latest options which are available.