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