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