4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
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
32 .Nd system build information
36 contains system-wide settings that will apply to every build using
41 This is achieved as follows:
43 processes the system makefile
45 before any other file by default, and
52 uses the standard makefile syntax.
55 should not specify any dependencies to
61 variables that control the actions of other makefiles.
63 The default location of
67 though an alternative location can be specified in the
71 You may need to override the location of
73 if the system-wide settings are not suitable for a particular build.
78 effectively resets all build controls to their defaults.
80 The primary purpose of
82 is to control the compilation of the
84 sources, documentation, and ported applications,
85 which are usually found in
90 As a rule, the system administrator creates
92 when the values of certain control variables need to be changed
95 The system build procedures occur in four broad areas:
96 the world, the kernel, documentation and ports.
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
108 The following lists provide a name and short description for each
109 variable you can use during the indicated builds.
113 are ignored; the variable being
119 be treated as if it were set.
121 The following list provides a name and short description for variables
122 that are used for all builds, or are used by the
124 for things other than builds.
126 .It Va ALWAYS_CHECK_MAKE
128 Instructs the top-level makefile in the source tree (normally
133 Normally this is only done for the world and buildworld targets to handle
134 upgrades from older versions of
138 Controls the compiler setting when compiling C code.
139 Optimization levels other than
146 Controls which processor should be targeted for generated
148 This controls processor-specific optimizations in
149 certain code (currently only OpenSSL) as well as modifying
154 to contain the appropriate optimization directive to
156 The automatic setting of
158 may be overridden using the
162 .Pa /usr/share/examples/etc/make.conf
163 for a list of recognized
168 Controls the compiler settings when compiling C++ code.
170 is initially set to the value of
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
186 Note that some makefiles (including those in
188 may hardcode options for the supplied install command.
191 List any directories that should be entered when doing
197 Controls the shell used internally by
199 to process the command scripts in makefiles.
204 all currently supported.
207 .It Va MTREE_FOLLOWS_SYMLINKS
216 Setting this variable will prevent CPU specific compiler flags
217 from being automatically added to
222 Set this to not update the doc tree during
223 .Dq Li "make update" .
224 .It Va NO_PORTSUPDATE
226 Set this to not update the ports tree during
227 .Dq Li "make update" .
235 .Dq Li "make update" .
236 Note that since a subversion client is not included in the base system,
239 to the full path of a
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:
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
257 Controls the compiler settings when building the
259 Optimization levels above
260 .Oo Fl O ( O2 , No ...\& ) Oc
261 are not guaranteed to work.
264 Controls which kernel configurations will be
266 .Dq Li "${MAKE} buildkernel"
268 .Dq Li "${MAKE} installkernel" .
270 .Bd -literal -offset indent
271 KERNCONF=MINE DEBUG GENERIC OTHERMACHINE
274 will build the kernels specified by the config files
275 .Pa MINE , DEBUG , GENERIC ,
278 and install the kernel specified by the config file
282 .It Va MODULES_OVERRIDE
284 Set to a list of modules to build instead of all of them.
285 .It Va NO_KERNELCLEAN
287 Set this to skip running
288 .Dq Li "${MAKE} clean"
290 .Dq Li "${MAKE} buildkernel" .
291 .It Va NO_KERNELCONFIG
293 Set this to skip running
296 .Dq Li "${MAKE} buildkernel" .
299 Set this to skip running
302 .Dq Li "${MAKE} buildkernel" .
305 Set to not build modules with the kernel.
307 Set this to the list of ports you wish to rebuild every time the kernel
309 .It Va WITHOUT_MODULES
311 Set to a list of modules to exclude from the build.
313 somewhat easier way to exclude modules you are certain you will never
315 .Va MODULES_OVERRIDE .
318 .Va MODULES_OVERRIDE .
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:
324 .It Va BOOT_COMCONSOLE_PORT
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
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
334 Compile in the code into
336 that forces the use of a serial console.
337 This is analogous to the
342 .It Va BOOT_PXELDR_PROBE_KEYBOARD
344 Compile in the code into
346 that probes the keyboard.
347 If no keyboard is found, boot with the dual console configuration.
348 This is analogous to the
353 .It Va ENABLE_SUID_K5SU
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
362 with the set-user-ID bit set.
365 will not be able to change users' groups.
366 .It Va LOADER_TFTP_SUPPORT
370 loader retrieves the kernel via NFS.
371 Defining this and recompiling
373 will cause it to retrieve the kernel via TFTP.
376 to load a custom BOOTP diskless kernel yet
377 still mount the server's
379 rather than load the server's kernel.
380 .It Va LOADER_FIREWIRE_SUPPORT
382 Defining this and recompiling
383 .Pa /usr/src/stand/i386
388 and allow access over FireWire(IEEE1394) using
390 Currently, only i386 and amd64 are supported.
391 .It Va MALLOC_PRODUCTION
393 Set this to disable assertions and statistics gathering in
395 It also defaults the A and J runtime options to off.
396 Disabled by default on -CURRENT.
397 .It Va MODULES_WITH_WORLD
399 Set to build modules with the system instead of the kernel.
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.
408 .Dq Li "${MAKE} clean"
410 .Dq Li "${MAKE} cleandir" .
411 .It Va WITH_MANCOMPRESS
413 Set to install manual pages compressed.
414 .It Va WITHOUT_MANCOMPRESS
416 Set to install manual pages uncompressed.
419 Set to not build in the
428 statically linked, this can be bad.
429 If set, every utility that uses
431 will be linked statically.
436 without support for network address translation (NAT).
437 .It Va PPP_NO_NETGRAPH
441 without support for Netgraph.
446 without support for RADIUS.
449 Set to disable the installation of
451 as a set-user-ID root program.
452 .It Va SENDMAIL_ADDITIONAL_MC
456 files which should be built into
459 The value should include the full path to the
462 .Pa /etc/mail/foo.mc ,
463 .Pa /etc/mail/bar.mc .
464 .It Va SENDMAIL_ALIASES
468 files to rebuild when using
469 .Pa /etc/mail/Makefile .
471 .Pa /etc/mail/aliases .
472 .It Va SENDMAIL_CFLAGS
474 Flags to pass to the compile command when building
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
484 .It Va SENDMAIL_CF_DIR
486 Override the default location for the
488 configuration files used to build a
493 .It Va SENDMAIL_DPADD
495 Extra dependencies to add when building
497 .It Va SENDMAIL_LDADD
499 Flags to add to the end of the
501 command when building
503 .It Va SENDMAIL_LDFLAGS
507 command when building
509 .It Va SENDMAIL_M4_FLAGS
518 .It Va SENDMAIL_MAP_PERMS
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
525 Additional maps to rebuild when using
526 .Pa /etc/mail/Makefile .
536 maps are always rebuilt if they exist.
537 .It Va SENDMAIL_MAP_TYPE
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.
547 configuration file to use at install time.
548 The value should include the full path to the
551 .Pa /etc/mail/myconfig.mc .
552 Use with caution as a make install will overwrite any existing
553 .Pa /etc/mail/sendmail.cf .
557 .It Va SENDMAIL_SET_USER_ID
561 as a set-user-ID root binary instead of a set-group-ID binary
563 .Pa /etc/mail/submit.{cf,mc} .
564 Use of this flag is not recommended and the alternative advice in
566 should be followed instead if at all possible.
567 .It Va SENDMAIL_START_SCRIPT
570 .Pa /etc/mail/Makefile
571 to start, stop, and restart
574 .Pa /etc/rc.sendmail .
575 This value should match the
576 .Dq Li mta_start_script
579 .It Va SENDMAIL_SUBMIT_MC
583 configuration file for mail submission
584 to use at install time.
585 The value should include the full path to the
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
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
599 The default number is 20011.
600 .It Va WANT_FORCE_OPTIMIZATION_DOWNGRADE
602 Causes the system compiler to be built such that it forces high optimization
603 levels to a lower one.
606 and above is known to trigger known optimizer bugs at various
608 The value assigned is the highest optimization value used.
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"
616 Where distfiles are kept.
623 The list of languages and encodings to build and install.
626 The default format for system documentation, depends on your
630 for simple printers, or
632 for postscript or graphics printers with a ghostscript
636 Several make variables can be set that affect the building of ports.
637 These variables and their effects are documented in
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
664 file appeared sometime before
668 manual page was written by
669 .An Mike W. Meyer Aq Mt mwm@mired.org .
675 are environment variables and should not be set in
677 or as command line arguments to
679 but in make's environment.
681 This manual page may occasionally be out of date with respect to
682 the options currently available for use in
685 .Pa /usr/share/examples/etc/make.conf
686 file for the latest options which are available.