make.conf.5: Note that NO_WERROR applies to the kernel build as well.
[dragonfly.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: src/share/man/man5/make.conf.5,v 1.12.2.30 2003/05/18 17:05:55 brueffer Exp $
26 .\" $DragonFly: src/share/man/man5/make.conf.5,v 1.38 2008/11/03 00:25:45 pavalos Exp $
27 .\"
28 .Dd December 20, 2009
29 .Dt MAKE.CONF 5
30 .Os
31 .Sh NAME
32 .Nm make.conf
33 .Nd system build information
34 .Sh DESCRIPTION
35 The file
36 .Nm
37 contains settings that control the compilation of the
38 .Dx
39 sources.
40 The file
41 .Nm
42 is generally created by the system administrator when the values need
43 to be changed from their defaults.
44 .Pp
45 The purpose of
46 .Nm
47 is not to run commands or perform compilation actions
48 directly.
49 Instead, it is included by the various makefiles in
50 .Pa /usr/src
51 which conditionalize their internal actions according to the settings
52 found there.
53 .Pp
54 The
55 .Pa /etc/make.conf
56 file is included from the appropriate
57 .Pa Makefile
58 which specifies the default settings for all the available options.
59 Options need only be specified in
60 .Pa /etc/make.conf
61 when the system administrator wishes to override these defaults.
62 .Pp
63 The build procedures occur in three areas: world, kernel, and
64 documentation.
65 Variables set in
66 .Nm
67 may be applicable during builds in one, two, or all of these areas.
68 They may be specified for a particular build via the
69 .Fl D
70 option of
71 .Xr make 1 .
72 .Pp
73 The following lists provide a name and short description for each
74 variable you can use during the indicated builds.
75 The values of variables flagged as
76 .Vt bool
77 are ignored; the variable being set at all (even to
78 .Dq Li FALSE
79 or
80 .Dq Li NO )
81 causes it to be treated as if it were set.
82 .Pp
83 The following list provides a name and short description for variables
84 that are used for all builds, or are used by the
85 .Pa makefiles
86 for things other than builds.
87 .Bl -tag -width Ar
88 .It Va CPUTYPE
89 .Pq Vt str
90 Controls which processor should be targeted for generated code.
91 This controls processor-specific optimizations in certain code
92 (currently only OpenSSL) as well as modifying the value of
93 .Va CFLAGS
94 and
95 .Va COPTFLAGS
96 to contain the appropriate optimization directive to
97 .Xr gcc 1 .
98 The automatic setting of
99 .Va CFLAGS
100 and
101 .Va COPTFLAGS
102 may be overridden using the
103 .Va NO_CPU_CFLAGS
104 and
105 .Va NO_CPU_COPTFLAGS
106 variables, respectively.  Refer to
107 .Pa /usr/share/examples/etc/defaults/make.conf
108 for a list of recognized
109 .Va CPUTYPE
110 options.
111 .It Va CCVER
112 .Pq Vt str
113 Controls which GCC version to use by default.
114 It should be set as
115 .Li CCVER?=
116 so as not to interfere with overrides from userland.
117 We currently recommend that an override NOT be set in
118 .Pa /etc/make.conf .
119 Currently accepted values for compilers which are part of
120 .Dx
121 are
122 .Dq gcc41
123 (default) and
124 .Dq gcc44 .
125 All other values will handled according to the settings in
126 .Xr compilers.conf 5 .
127 .It Va BINUTILSVER
128 .Pq Vt str
129 Controls which binutils to use by default.
130 Currently accepted values are
131 .Dq binutils217
132 (default) and
133 .Dq binutils220 .
134 .It Va CFLAGS
135 .Pq Vt str
136 Controls the compiler setting when compiling C code.
137 Optimization levels above
138 .Fl O
139 .Pq Fl O2 , No ...
140 are not supported.
141 .Va BDECFLAGS
142 is provided as a set of
143 .Xr gcc 1
144 settings suggested by
145 .An "Bruce Evans" Aq bde@FreeBSD.org
146 for developing and testing changes.
147 They can be used, if set, by:
148 .Bd -literal -offset indent
149 CFLAGS+=${BDECFLAGS}
150 .Ed
151 .It Va DEBUG_FLAGS
152 .Pq Vt str
153 Similar to
154 .Va CFLAGS
155 but it will cause
156 .Va STRIP
157 to be set to a blank value, if set.
158 Typically,
159 .Va DEBUG_FLAGS
160 is set to
161 .Fl g
162 for compiling with debug symbols.
163 .It Va NO_CPU_CFLAGS
164 .Pq Vt str
165 Setting this variable will prevent CPU specific compiler flags
166 from being automatically added to
167 .Va CFLAGS
168 during compile time.
169 .It Va CXXFLAGS
170 .Pq Vt str
171 Controls the compiler settings when compiling C++ code.
172 .Va CXXFLAGS
173 is initially set to the value of
174 .Va CFLAGS .
175 If you want to add to the
176 .Va CXXFLAGS
177 value, use
178 .Dq Li +=
179 instead of
180 .Dq Li = .
181 .It Va INSTALL
182 .Pq Vt str
183 the default install command.
184 To have components compared before doing the install, use
185 .Bd -literal -offset indent
186 INSTALL="install -C"
187 .Ed
188 .It Va LOCAL_DIRS
189 .Pq Vt str
190 List any directories that should be entered when running make
191 .Pa /usr/src
192 in this variable.
193 .It Va MAKE_SHELL
194 .Pq Vt str
195 Controls the shell used internally by
196 .Xr make 1
197 to process the command scripts in makefiles.
198 .Xr sh 1 ,
199 .Xr ksh 1 ,
200 and
201 .Xr csh 1
202 all currently supported.
203 .Bd -literal -offset indent
204 MAKE_SHELL?=sh
205 .Ed
206 .It Va MODULES_OVERRIDE
207 .Pq Vt str
208 Set to a list of modules to build instead of all of them.
209 .It Va MTREE_FOLLOWS_SYMLINKS
210 .Pq Vt str
211 Set this to
212 .Dq Fl L
213 to cause
214 .Xr mtree 8
215 to follow symlinks.
216 .It Va STRIP
217 .Pq Vt str
218 Set this to the flag to pass to the
219 .Xr strip 1
220 command.
221 If set to a blank value, debug symbols will not be removed.
222 .Va STRIP
223 is automatically set to a blank value if
224 .Va DEBUG_FLAGS
225 is set.
226 .It Va WANT_HESIOD
227 .Pq Vt bool
228 Set this to build
229 .Xr hesiod 3
230 support into libc.
231 .It Va NO_NS_CACHING
232 .Pq Vt bool
233 Set this to disable name caching in the nsswitch subsystem.
234 The generic caching daemon,
235 .Xr nscd 8 ,
236 will not be built either if this option is set.
237 .It Va NO_WERROR
238 Set this if you don't want
239 .Fl Werror
240 to be added to
241 .Va CWARNFLAGS
242 or used in the kernel build.
243 .It Va STATIC_LOCALES
244 .Pq Vt str
245 Set to a list of locales to build into statically-linked binaries.
246 Currently supported locales are: BIG5 EUC EUCTW ISO2022 MSKanji UTF8
247 .El
248 .Pp
249 The following list provides a name and short description for variables
250 that are only used doing a kernel build:
251 .Bl -tag -width Ar
252 .It Va BOOT_COMCONSOLE_PORT
253 .Pq Vt str
254 The port address to use for the console if the boot blocks have
255 been configured to use a serial console instead of the keyboard/video card.
256 .It Va BOOT_COMCONSOLE_SPEED
257 .Pq Vt int
258 The baud rate to use for the console if the boot blocks have
259 been configured to use a serial console instead of the keyboard/video card.
260 .It Va COPTFLAGS
261 .Pq Vt str
262 Controls the compiler settings when building the
263 kernel.
264 Optimization levels above
265 .Fl O
266 .Pq Fl O2 , No ...
267 are not guaranteed to work.
268 .It Va KERNCONF
269 .Pq Vt str
270 Controls which kernel configurations will be
271 built by
272 .Dq Li "${MAKE} buildkernel"
273 and installed by
274 .Dq Li "${MAKE} installkernel" .
275 For example,
276 .Bd -literal -offset indent
277 KERNCONF=MINE DEBUG GENERIC OTHERMACHINE
278 .Ed
279 .Pp
280 will build the kernels specified by the config files
281 .Pa MINE , DEBUG , GENERIC ,
282 and
283 .Pa OTHERMACHINE ,
284 and install the kernel specified by the config file
285 .Pa MINE .
286 It defaults to
287 .Pa GENERIC .
288 .It Va LOADER_TFTP_SUPPORT
289 .Pq Vt bool
290 While not a buildkernel-affected option, there is no better place for this.
291 By default the
292 .Xr pxeboot 8
293 loader retrieves the kernel via NFS.
294 Defining this and recompiling
295 .Pa /usr/src/sys/boot
296 will cause it to retrieve the kernel via TFTP.
297 This allows pxeboot to load a custom BOOTP diskless kernel yet
298 still mount the server's
299 .Pa /
300 rather than load the server's kernel.
301 .It Va NO_CPU_COPTFLAGS
302 .Pq Vt str
303 Setting this variable will prevent CPU specific compiler flags
304 from being automatically added to
305 .Va COPTFLAGS
306 during compile time.
307 .It Va NO_KERNELCLEAN
308 .Pq Vt bool
309 Set this to skip the clean target when using
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_KERNEL_OLD_STRIP
324 .Pq Vt bool
325 Set this to skip stripping debugging symbols from old kernel and modules
326 (kernel.old, modules.old) during
327 .Dq Li "${MAKE} installkernel" .
328 .It Va NO_MODULES
329 .Pq Vt bool
330 Set to not build modules with the kernel.
331 .El
332 .Pp
333 The following list provides a name and short description for variables
334 that are used during the world build:
335 .Bl -tag -width Ar
336 .It Va ENABLE_SUID_SSH
337 .Pq Vt bool
338 Set this to install
339 .Xr ssh 1
340 with the setuid bit turned on.
341 .It Va MODULES_WITH_WORLD
342 .Pq Vt bool
343 Set to build modules with the system instead of the kernel.
344 .It Va NO_BIND
345 .Pq Vt bool
346 Set to not build BIND.
347 .It Va NO_CRYPT
348 .Pq Vt bool
349 Set to not build crypto code.
350 .It Va NO_CVS
351 .Pq Vt bool
352 Set to not build CVS.
353 .It Va NO_GAMES
354 .Pq Vt bool
355 Set to not build games.
356 .It Va NO_GCC44
357 .Pq Vt bool
358 Set to not build the newer version of GCC (4.4).
359 .It Va NO_GDB
360 .Pq Vt bool
361 Set to not build
362 .Xr gdb 1
363 .It Va NO_I4B
364 .Pq Vt bool
365 Set to not build isdn4bsd package.
366 .It Va NO_IPFILTER
367 .Pq Vt bool
368 Set to not build IP Filter package.
369 .It Va NO_LIBC_R
370 .Pq Vt bool
371 Set to not build
372 .Nm libc_r
373 (reentrant version of
374 .Nm libc ) .
375 .It Va NO_LPR
376 .Pq Vt bool
377 Set to not build
378 .Xr lpr 1
379 and related programs.
380 .It Va NO_MAILWRAPPER
381 .Pq Vt bool
382 Set to not build the
383 .Xr mailwrapper 8
384 MTA selector.
385 .It Va NO_OBJC
386 .Pq Vt bool
387 Set to not build Objective C support.
388 .It Va NO_OPENSSH
389 .Pq Vt bool
390 Set to not build OpenSSH.
391 .It Va NO_OPENSSL
392 .Pq Vt bool
393 Set to not build OpenSSL (implies
394 .Va NO_OPENSSH ) .
395 .It Va NO_SENDMAIL
396 .Pq Vt bool
397 Set to not build
398 .Xr sendmail 8
399 and related programs.
400 .It Va NO_SHARE
401 .Pq Vt bool
402 Set to not enter the share subdirectory.
403 .It Va NO_X
404 .Pq Vt bool
405 Set to not compile in X\-Windows support (e.g.\&
406 .Xr doscmd 1 ) .
407 .It Va NOCLEAN
408 .Pq Vt bool
409 Set this to disable cleaning during
410 .Dq Li "make buildworld" .
411 This should not be set unless you know what you are doing.
412 .It Va NOCLEANDIR
413 .Pq Vt bool
414 Set this to run
415 .Dq Li "${MAKE} clean"
416 instead of
417 .Dq Li "${MAKE} cleandir" .
418 .It Va NOFSCHG
419 .Pq Vt bool
420 Set to not install certain components with flag schg.
421 This is useful in a jailed environment.
422 .It Va NOINFO
423 .Pq Vt bool
424 Set to not make or install
425 .Xr info 5
426 files.
427 .It Va NOINFOCOMPRESS
428 .Pq Vt bool
429 Set to not compress the info pages.
430 .It Va NOMAN
431 .Pq Vt bool
432 Set to not build manual pages
433 .It Va NOMANCOMPRESS
434 .Pq Vt bool
435 Set to not compress the manual pages.
436 .It Va NOPROFILE
437 .Pq Vt bool
438 Set to avoid compiling profiled libraries.
439 .It Va PPP_NOSUID
440 .Pq Vt bool
441 Set to disable the installation of
442 .Xr ppp 8
443 with the set-user-ID bit on.
444 .It Va SENDMAIL_MC
445 .Pq Vt str
446 The default
447 .Xr m4 1
448 configuration file to use at install time.
449 The value should include the full path to the
450 .Pa .mc
451 file, e.g.,
452 .Pa /etc/mail/myconfig.mc .
453 Use with caution as a make install will overwrite any existing
454 .Pa /etc/mail/sendmail.cf .
455 Note that
456 .Va SENDMAIL_CF
457 is now deprecated.
458 .It Va SENDMAIL_SUBMIT_MC
459 .Pq Vt str
460 The default
461 .Xr m4 1
462 configuration file for mail submission
463 to use at install time.
464 The value should include the full path to the
465 .Pa .mc
466 file, e.g.,
467 .Pa /etc/mail/mysubmit.mc .
468 Use with caution as a make install will overwrite any existing
469 .Pa /etc/mail/submit.cf .
470 .It Va SENDMAIL_ADDITIONAL_MC
471 .Pq Vt str
472 Additional
473 .Pa .mc
474 files which should be built into
475 .Pa .cf
476 files at build time.
477 The value should include the full path to the
478 .Pa .mc
479 file(s), e.g.,
480 .Pa /etc/mail/foo.mc
481 .Pa /etc/mail/bar.mc .
482 .It Va SENDMAIL_CF_DIR
483 .Pq Vt str
484 Override the default location for the
485 .Xr m4 1
486 configuration files used to build a
487 .Pa .cf
488 file from a
489 .Pa .mc
490 file.
491 .It Va SENDMAIL_M4_FLAGS
492 .Pq Vt str
493 Flags passed to
494 .Xr m4 1
495 when building a
496 .Pa .cf
497 file from a
498 .Pa .mc
499 file.
500 .It Va SENDMAIL_CFLAGS
501 .Pq Vt str
502 Flags to pass to the compile command when building
503 .Xr sendmail 8 .
504 The
505 .Va SENDMAIL_*
506 flags can be used to provide SASL support with setting such as:
507 .Bd -literal -offset indent
508 SENDMAIL_CFLAGS=-I/usr/local/include -DSASL
509 SENDMAIL_LDFLAGS=-L/usr/local/lib
510 SENDMAIL_LDADD=-lsasl
511 .Ed
512 .It Va SENDMAIL_LDFLAGS
513 .Pq Vt str
514 Flags to pass to the
515 .Xr ld 1
516 command when building
517 .Xr sendmail 8 .
518 .It Va SENDMAIL_LDADD
519 .Pq Vt str
520 Flags to add to the end of the
521 .Xr ld 1
522 command when building
523 .Xr sendmail 8 .
524 .It Va SENDMAIL_DPADD
525 .Pq Vt str
526 Extra dependencies to add when building
527 .Xr sendmail 8 .
528 .It Va SENDMAIL_SET_USER_ID
529 .Pq Vt bool
530 If set, install
531 .Xr sendmail 8
532 as a set-user-ID root binary instead of a set-group-ID binary
533 and do not install
534 .Pa /etc/mail/submit.{cf,mc} .
535 Use of this flag is not recommended and the alternative advice in
536 .Pa /etc/mail/README
537 should be followed instead if at all possible.
538 .It Va SENDMAIL_MAP_PERMS
539 .Pq Vt str
540 Mode to use when generating alias and map database files using
541 .Pa /etc/mail/Makefile .
542 The default value is 0640.
543 .It Va THREAD_LIB
544 .Pq Vt str
545 Set to either
546 .Li c_r
547 or
548 .Li thread_xu
549 to configure the system's default threading library.
550 The default is
551 .Li thread_xu .
552 .It Va WANT_IDEA
553 .Pq Vt bool
554 Set to build the IDEA encryption code.
555 This code is patented in the USA and many European countries.
556 It is
557 .Em "YOUR RESPONSIBILITY"
558 to determine if you can legally use IDEA.
559 .It Va WANT_INSTALLER
560 .Pq Vt bool
561 Set to build the installer.
562 .El
563 .Pp
564 The following list provides a name and short description for variables
565 that are used when building documentation.
566 .Bl -tag -width Ar
567 .It Va DOC_LANG
568 .Pq Vt str
569 The list of languages and encodings to build and install.
570 .It Va PRINTERDEVICE
571 .Pq Vt str
572 The default format for system documentation, depends on your
573 printer.
574 This can be set to
575 .Dq Li ascii
576 for simple printers or
577 .Dq Li ps
578 for postscript or graphics printers with a ghostscript
579 filter.
580 .It Va GROFF_PAPER_SIZE
581 .Pq Vt str
582 The default paper size for
583 .Xr groff 1
584 (either
585 .Dq letter
586 or
587 .Dq A4 ) .
588 .El
589 .Sh FILES
590 .Bl -tag -width /etc/defaults/make.conf -compact
591 .It Pa /etc/defaults/make.conf
592 .It Pa /etc/make.conf
593 .It Pa /usr/src/Makefile
594 .It Pa /usr/src/Makefile.inc1
595 .El
596 .Sh SEE ALSO
597 .Xr gcc 1 ,
598 .Xr install 1 ,
599 .Xr make 1 ,
600 .Xr lpd 8 ,
601 .Xr sendmail 8
602 .Sh HISTORY
603 The
604 .Nm
605 file appeared sometime before
606 .Fx 4.0 .
607 .Sh AUTHORS
608 This manual page was written by
609 .An Mike W. Meyer Aq mwm@mired.org .