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