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
107 In the case of world and kernel builds it is possible to put these variables
112 This way the environment for documentation and ports builds is not polluted
113 by unrelated variables.
115 The following lists provide a name and short description for each
116 variable you can use during the indicated builds.
120 are ignored; the variable being
126 be treated as if it were set.
128 The following list provides a name and short description for variables
129 that are used for all builds, or are used by the
131 for things other than builds.
133 .It Va ALWAYS_CHECK_MAKE
135 Instructs the top-level makefile in the source tree (normally
140 Normally this is only done for the world and buildworld targets to handle
141 upgrades from older versions of
145 Controls the compiler setting when compiling C code.
146 Optimization levels other than
153 Controls which processor should be targeted for generated
155 This controls processor-specific optimizations in
156 certain code (currently only OpenSSL) as well as modifying
161 to contain the appropriate optimization directive to
163 The automatic setting of
165 may be overridden using the
169 .Pa /usr/share/examples/etc/make.conf
170 for a list of recognized
175 Controls the compiler settings when compiling C++ code.
177 is initially set to the value of
188 Select the compiler for DTS (Device Tree Syntax) file.
190 is initially set to the value of dtc
193 the default install command.
194 To install only files for which the target differs or does not exist, use
195 .Bd -literal -offset indent
198 Note that some makefiles (including those in
200 may hardcode options for the supplied install command.
203 List any directories that should be entered when doing
209 Controls the shell used internally by
211 to process the command scripts in makefiles.
216 all currently supported.
219 .It Va MTREE_FOLLOWS_SYMLINKS
228 Setting this variable will prevent CPU specific compiler flags
229 from being automatically added to
233 .Ss "BUILDING THE KERNEL"
234 The following list provides a name and short description for variables
235 that are only used doing a kernel build:
239 Controls the amount of time the kernel waits for a console keypress
240 before booting the default kernel.
241 The value is approximately milliseconds.
242 Keypresses are accepted by the BIOS before booting from disk,
243 making it possible to give custom boot parameters even when this is
247 Controls the compiler settings when building the
249 Optimization levels above
250 .Oo Fl O ( O2 , No ...\& ) Oc
251 are not guaranteed to work.
254 Controls which kernel configurations will be
256 .Dq Li "${MAKE} buildkernel"
258 .Dq Li "${MAKE} installkernel" .
260 .Bd -literal -offset indent
261 KERNCONF=MINE DEBUG GENERIC OTHERMACHINE
264 will build the kernels specified by the config files
265 .Pa MINE , DEBUG , GENERIC ,
268 and install the kernel specified by the config file
272 .It Va MODULES_OVERRIDE
274 Set to a list of modules to build instead of all of them.
275 .It Va NO_KERNELCLEAN
277 Set this to skip running
278 .Dq Li "${MAKE} clean"
280 .Dq Li "${MAKE} buildkernel" .
281 .It Va NO_KERNELCONFIG
283 Set this to skip running
286 .Dq Li "${MAKE} buildkernel" .
289 Set this to skip running
292 .Dq Li "${MAKE} buildkernel" .
295 Set to not build modules with the kernel.
297 Set this to the list of ports you wish to rebuild every time the kernel
299 .It Va WITHOUT_MODULES
301 Set to a list of modules to exclude from the build.
303 somewhat easier way to exclude modules you are certain you will never
305 .Va MODULES_OVERRIDE .
308 .Va MODULES_OVERRIDE .
310 .Ss "BUILDING THE WORLD"
311 The following list provides a name and short description for variables
312 that are used during the world build:
314 .It Va BOOT_COMCONSOLE_PORT
316 The port address to use for the console if the boot blocks have
317 been configured to use a serial console instead of the keyboard/video card.
318 .It Va BOOT_COMCONSOLE_SPEED
320 The baud rate to use for the console if the boot blocks have
321 been configured to use a serial console instead of the keyboard/video card.
322 .It Va BOOT_PXELDR_ALWAYS_SERIAL
324 Compile in the code into
326 that forces the use of a serial console.
327 This is analogous to the
332 .It Va BOOT_PXELDR_PROBE_KEYBOARD
334 Compile in the code into
336 that probes the keyboard.
337 If no keyboard is found, boot with the dual console configuration.
338 This is analogous to the
343 .It Va ENABLE_SUID_K5SU
345 Set this if you wish to use the ksu utility.
346 Otherwise, it will be
347 installed without the set-user-ID bit set.
348 .It Va ENABLE_SUID_NEWGRP
352 with the set-user-ID bit set.
355 will not be able to change users' groups.
356 .It Va LOADER_TFTP_SUPPORT
360 loader retrieves the kernel via NFS.
361 Defining this and recompiling
363 will cause it to retrieve the kernel via TFTP.
366 to load a custom BOOTP diskless kernel yet
367 still mount the server's
369 rather than load the server's kernel.
370 .It Va LOADER_FIREWIRE_SUPPORT
372 Defining this and recompiling
373 .Pa /usr/src/stand/i386
378 and allow access over FireWire(IEEE1394) using
380 Currently, only i386 and amd64 are supported.
383 Space-delimited list of one or more MACHINE and/or MACHINE_ARCH values
384 for which section 4 man pages will be installed.
387 installs all available architectures.
388 It is also the default value.
389 .It Va MODULES_WITH_WORLD
391 Set to build modules with the system instead of the kernel.
394 Set this to disable cleaning during
395 .Dq Li "make buildworld" .
396 This should not be set unless you know what you are doing.
400 .Dq Li "${MAKE} clean"
402 .Dq Li "${MAKE} cleandir" .
403 .It Va WITH_MANCOMPRESS
405 Set to install manual pages compressed.
406 .It Va WITHOUT_MANCOMPRESS
408 Set to install manual pages uncompressed.
411 Set to not build in the
420 statically linked, this can be bad.
421 If set, every utility that uses
423 will be linked statically.
424 .It Va PKG_REPO_SIGNING_KEY
426 Path to rsa private key passed to
428 to sign packages created when building the
430 target, i.e.: pkgbase.
431 The variable is named the same in
433 so it will automatically be picked up when building pkgbase with poudriere.
438 without support for network address translation (NAT).
439 .It Va PPP_NO_NETGRAPH
443 without support for Netgraph.
448 without support for RADIUS.
451 Set to disable the installation of
453 as a set-user-ID root program.
454 .It Va SENDMAIL_ADDITIONAL_MC
458 files which should be built into
461 The value should include the full path to the
464 .Pa /etc/mail/foo.mc ,
465 .Pa /etc/mail/bar.mc .
466 .It Va SENDMAIL_ALIASES
470 files to rebuild when using
471 .Pa /etc/mail/Makefile .
473 .Pa /etc/mail/aliases .
474 .It Va SENDMAIL_CFLAGS
476 Flags to pass to the compile command when building
480 flags can be used to provide SASL support with setting such as:
481 .Bd -literal -offset indent
482 SENDMAIL_CFLAGS=-I/usr/local/include -DSASL
483 SENDMAIL_LDFLAGS=-L/usr/local/lib
484 SENDMAIL_LDADD=-lsasl
486 .It Va SENDMAIL_CF_DIR
488 Override the default location for the
490 configuration files used to build a
495 .It Va SENDMAIL_DPADD
497 Extra dependencies to add when building
499 .It Va SENDMAIL_LDADD
501 Flags to add to the end of the
503 command when building
505 .It Va SENDMAIL_LDFLAGS
509 command when building
511 .It Va SENDMAIL_M4_FLAGS
520 .It Va SENDMAIL_MAP_PERMS
522 Mode to use when generating alias and map database files using
523 .Pa /etc/mail/Makefile .
524 The default value is 0640.
525 .It Va SENDMAIL_MAP_SRC
527 Additional maps to rebuild when using
528 .Pa /etc/mail/Makefile .
538 maps are always rebuilt if they exist.
539 .It Va SENDMAIL_MAP_TYPE
541 Database map type to use when generating map database files using
542 .Pa /etc/mail/Makefile .
543 The default value is hash.
544 The alternative is btree.
549 configuration file to use at install time.
550 The value should include the full path to the
553 .Pa /etc/mail/myconfig.mc .
554 Use with caution as a make install will overwrite any existing
555 .Pa /etc/mail/sendmail.cf .
559 .It Va SENDMAIL_SET_USER_ID
563 as a set-user-ID root binary instead of a set-group-ID binary
565 .Pa /etc/mail/submit.{cf,mc} .
566 Use of this flag is not recommended and the alternative advice in
568 should be followed instead if at all possible.
569 .It Va SENDMAIL_START_SCRIPT
572 .Pa /etc/mail/Makefile
573 to start, stop, and restart
576 .Pa /etc/rc.d/sendmail .
577 .It Va SENDMAIL_SUBMIT_MC
581 configuration file for mail submission
582 to use at install time.
583 The value should include the full path to the
586 .Pa /etc/mail/mysubmit.mc .
587 Use with caution as a make install will overwrite any existing
588 .Pa /etc/mail/submit.cf .
589 .It Va TOP_TABLE_SIZE
592 uses a hash table for the user names.
593 The size of this hash can be tuned to match the number of local users.
594 The table size should be a prime number
595 approximately twice as large as the number of lines in
597 The default number is 20011.
598 .It Va WANT_FORCE_OPTIMIZATION_DOWNGRADE
600 Causes the system compiler to be built such that it forces high optimization
601 levels to a lower one.
604 and above is known to trigger known optimizer bugs at various
606 The value assigned is the highest optimization value used.
608 .Ss "BUILDING DOCUMENTATION"
609 The following list provides a name and short description for variables
610 that are used when building documentation.
611 .Bl -tag -width ".Va PRINTERDEVICE"
614 The list of languages to build and install when building documentation
619 The default format for system documentation in
620 .Pa /usr/src/share/doc ,
621 depends on your printer.
624 for simple printers, or
626 for postscript or graphics printers with a ghostscript
630 Several make variables can be set that affect the building of ports.
631 These variables and their effects are documented in
638 .Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact
639 .It Pa /etc/make.conf
640 .It Pa /usr/doc/Makefile
641 .It Pa /usr/ports/Makefile
642 .It Pa /usr/share/examples/etc/make.conf
643 .It Pa /usr/share/mk/sys.mk
644 .It Pa /usr/src/Makefile
645 .It Pa /usr/src/Makefile.inc1
652 .Xr style.Makefile 5 ,
659 file appeared sometime before
663 manual page was written by
664 .An Mike W. Meyer Aq Mt mwm@mired.org .
670 are environment variables and should not be set in
672 or as command line arguments to
674 but in make's environment.
676 This manual page may occasionally be out of date with respect to
677 the options currently available for use in
680 .Pa /usr/share/examples/etc/make.conf
681 file for the latest options which are available.