]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man7/build.7
MFC r365640: Improvements for the src.conf(5) and build(7) man pages
[FreeBSD/FreeBSD.git] / share / man / man7 / build.7
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 September 11, 2020
28 .Dt BUILD 7
29 .Os
30 .Sh NAME
31 .Nm build
32 .Nd General instructions on how to build the system
33 .Sh DESCRIPTION
34 The sources for the
35 .Fx
36 system and its applications are contained in three different directories,
37 normally
38 .Pa /usr/src ,
39 .Pa /usr/doc ,
40 and
41 .Pa /usr/ports .
42 These directories may be initially empty or non-existent until updated with
43 .Xr svn 1
44 or
45 .Xr svnlite 1
46 or
47 .Xr portsnap 8 .
48 Directory
49 .Pa /usr/src
50 contains the
51 .Dq "base system"
52 sources, which is loosely defined as the things required to rebuild
53 the system to a useful state.
54 Directory
55 .Pa /usr/doc
56 contains the source for the system documentation, excluding the manual
57 pages.
58 Directory
59 .Pa /usr/ports
60 contains a tree that provides a consistent interface for building and
61 installing third party applications.
62 For more information about the ports build process, see
63 .Xr ports 7 .
64 .Pp
65 The
66 .Xr make 1
67 command is used in each of these directories to build and install the
68 things in that directory.
69 Issuing the
70 .Xr make 1
71 command in any directory issues the
72 .Xr make 1
73 command recursively in all subdirectories.
74 With no target specified, the items in the directories are built
75 and no further action is taken.
76 .Pp
77 A source tree is allowed to be read-only.
78 As described in
79 .Xr make 1 ,
80 objects are usually built in a separate object directory hierarchy
81 specified by the environment variable
82 .Va MAKEOBJDIRPREFIX ,
83 or under
84 .Pa /usr/obj
85 if variable
86 .Va MAKEOBJDIRPREFIX
87 is not set.
88 The canonical object directory is described in the documentation for the
89 .Cm buildworld
90 target below.
91 .Pp
92 The build may be controlled by defining
93 .Xr make 1
94 variables described in the
95 .Sx ENVIRONMENT
96 section below, and by the variables documented in
97 .Xr make.conf 5 .
98 .Pp
99 The default components included in the build are specified in the file
100 .Pa /etc/src.conf
101 in the source tree.
102 To override the default file, include the SRCCONF option in the make steps,
103 pointing to a custom src.conf file.
104 For more information see
105 .Xr src.conf 5 .
106 .Pp
107 The following list provides the names and actions for the targets
108 supported by the build system:
109 .Bl -tag -width ".Cm cleandepend"
110 .It Cm analyze
111 Run Clang static analyzer against all objects and present output on stdout.
112 .It Cm check
113 Run tests for a given subdirectory.
114 The default directory used is
115 .Pa ${.OBJDIR} ,
116 but the check directory can be changed with
117 .Pa ${CHECKDIR} .
118 .It Cm checkworld
119 Run the
120 .Fx
121 test suite on installed world.
122 .It Cm clean
123 Remove any files created during the build process.
124 .It Cm cleandepend
125 Remove the
126 .Pa ${.OBJDIR}/${DEPENDFILE}*
127 files generated by prior
128 .Dq Li "make"
129 and
130 .Dq Li "make depend"
131 steps.
132 .It Cm cleandir
133 Remove the canonical object directory if it exists, or perform
134 actions equivalent to
135 .Dq Li "make clean cleandepend"
136 if it does not.
137 This target will also remove an
138 .Pa obj
139 link in
140 .Pa ${.CURDIR}
141 if that exists.
142 .Pp
143 It is advisable to run
144 .Dq Li "make cleandir"
145 twice: the first invocation will remove the canonical object directory
146 and the second one will clean up
147 .Pa ${.CURDIR} .
148 .It Cm depend
149 Generate a list of build dependencies in file
150 .Pa ${.OBJDIR}/${DEPENDFILE} .
151 Per-object dependencies are generated at build time and stored in
152 .Pa ${.OBJDIR}/${DEPENDFILE}.${OBJ} .
153 .It Cm install
154 Install the results of the build to the appropriate location in the
155 installation directory hierarchy specified in variable
156 .Va DESTDIR .
157 .It Cm obj
158 Create the canonical object directory associated with the current
159 directory.
160 .It Cm objlink
161 Create a symbolic link to the canonical object directory in
162 .Pa ${.CURDIR} .
163 .It Cm tags
164 Generate a tags file using the program specified in the
165 .Xr make 1
166 variable
167 .Va CTAGS .
168 The build system supports
169 .Xr ctags 1
170 and
171 .Nm "GNU Global" .
172 .El
173 .Pp
174 The other supported targets under directory
175 .Pa /usr/src
176 are:
177 .Bl -tag -width ".Cm distributeworld"
178 .It Cm buildenv
179 Spawn an interactive shell with environment variables set up for
180 building the system or individual components.
181 For cross-building the target architecture needs to be specified with
182 .Xr make 1
183 variables
184 .Va TARGET_ARCH
185 and
186 .Va TARGET .
187 .Pp
188 This target is only useful after a complete toolchain (including
189 the compiler, linker, assembler, headers and libraries) has been
190 built; see the
191 .Cm toolchain
192 target below.
193 .It Cm buildworld
194 Build everything but the kernel, configure files in
195 .Pa etc ,
196 and
197 .Pa release .
198 The object directory can be changed from the default
199 .Pa /usr/obj
200 by setting the
201 .Pa MAKEOBJDIRPREFIX
202 .Xr make 1
203 variable.
204 The actual build location prefix used
205 depends on the
206 .Va WITH_UNIFIED_OBJDIR
207 option from
208 .Xr src.conf 5 .
209 If enabled it is
210 .Pa ${MAKEOBJDIRPREFIX}${.CURDIR}/${TARGET}.${TARGET_ARCH}
211 for all builds.
212 If disabled it is
213 .Pa ${MAKEOBJDIRPREFIX}${.CURDIR}
214 for native builds, and
215 .Pa ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH}${.CURDIR}
216 for cross builds and native builds with variable
217 .Va CROSS_BUILD_TESTING
218 set.
219 .It Cm cleanworld
220 Attempt to clean up targets built by a preceding
221 .Cm buildworld ,
222 or similar step built from this source directory.
223 .It Cm cleanuniverse
224 When
225 .Va WITH_UNIFIED_OBJDIR
226 is enabled, attempt to clean up targets built by a preceding
227 .Cm buildworld ,
228 .Cm universe ,
229 or similar step, for any architecture built from this source directory.
230 .It Cm distributeworld
231 Distribute everything compiled by a preceding
232 .Cm buildworld
233 step.
234 Files are placed in the directory hierarchy specified by
235 .Xr make 1
236 variable
237 .Va DISTDIR .
238 This target is used while building a release; see
239 .Xr release 7 .
240 .It Cm native-xtools
241 This target builds a cross-toolchain for the given
242 .Sy TARGET
243 and
244 .Sy TARGET_ARCH ,
245 as well as a select list of static userland tools for the host system.
246 This is intended to be used in a jail where QEMU is used to improve
247 performance by avoiding emulating binaries that do not need to be emulated.
248 .Sy TARGET
249 and
250 .Sy TARGET_ARCH
251 should be defined.
252 .It Cm native-xtools-install
253 Installs the results to
254 .Pa ${DESTDIR}/${NXTP}
255 where
256 .Va NXTP
257 defaults to
258 .Pa nxb-bin .
259 .Sy TARGET
260 and
261 .Sy TARGET_ARCH
262 must be defined.
263 .It Cm packageworld
264 Archive the results of
265 .Cm distributeworld ,
266 placing the results in
267 .Va DISTDIR .
268 This target is used while building a release; see
269 .Xr release 7 .
270 .It Cm installworld
271 Install everything built by a preceding
272 .Cm buildworld
273 step into the directory hierarchy pointed to by
274 .Xr make 1
275 variable
276 .Va DESTDIR .
277 .Pp
278 If installing onto an NFS file system and running
279 .Xr make 1
280 with the
281 .Fl j
282 option, make sure that
283 .Xr rpc.lockd 8
284 is running on both client and server.
285 See
286 .Xr rc.conf 5
287 on how to make it start at boot time.
288 .It Cm toolchain
289 Create the build toolchain needed to build the rest of the system.
290 For cross-architecture builds, this step creates a cross-toolchain.
291 .It Cm universe
292 For each architecture,
293 execute a
294 .Cm buildworld
295 followed by a
296 .Cm buildkernel
297 for all kernels for that architecture,
298 including
299 .Pa LINT .
300 This command takes a long time.
301 .It Cm update
302 Get updated sources as configured in
303 .Xr make.conf 5 .
304 .It Cm targets
305 Print a list of supported
306 .Va TARGET
307 /
308 .Va TARGET_ARCH
309 pairs for world and kernel targets.
310 .It Cm tinderbox
311 Execute the same targets as
312 .Cm universe .
313 In addition print a summary of all failed targets at the end and
314 exit with an error if there were any.
315 .It Cm toolchains
316 Create a build toolchain for each architecture supported by the build system.
317 .It Cm xdev
318 Builds and installs a cross-toolchain and sysroot for the given
319 .Sy TARGET
320 and
321 .Sy TARGET_ARCH .
322 The sysroot contains target library and headers.
323 The target is an alias for
324 .Cm xdev-build
325 and
326 .Cm xdev-install .
327 The location of the files installed can be controlled with
328 .Va DESTDIR .
329 The target location in
330 .Va DESTDIR
331 is
332 .Pa ${DESTDIR}/${XDTP}
333 where
334 .Va XDTP
335 defaults to
336 .Pa /usr/${XDDIR}
337 and
338 .Va XDDIR
339 defaults to
340 .Pa ${TARGET_ARCH}-freebsd .
341 .It Cm xdev-build
342 Builds for the
343 .Cm xdev
344 target.
345 .It Cm xdev-install
346 Installs the files for the
347 .Cm xdev
348 target.
349 .It Cm xdev-links
350 Installs autoconf-style symlinks to
351 .Pa ${DESTDIR}/usr/bin
352 pointing into the xdev toolchain in
353 .Pa ${DESTDIR}/${XDTP} .
354 .El
355 .Pp
356 Kernel specific build targets in
357 .Pa /usr/src
358 are:
359 .Bl -tag -width ".Cm distributekernel"
360 .It Cm buildkernel
361 Rebuild the kernel and the kernel modules.
362 The object directory can be changed from the default
363 .Pa /usr/obj
364 by setting the
365 .Pa MAKEOBJDIRPREFIX
366 .Xr make 1
367 variable.
368 .It Cm installkernel
369 Install the kernel and the kernel modules to directory
370 .Pa ${DESTDIR}/boot/kernel ,
371 renaming any pre-existing directory with this name to
372 .Pa kernel.old
373 if it contained the currently running kernel.
374 The target directory under
375 .Pa ${DESTDIR}
376 may be modified using the
377 .Va INSTKERNNAME
378 and
379 .Va KODIR
380 .Xr make 1
381 variables.
382 .It Cm distributekernel
383 Install the kernel to the directory
384 .Pa ${DISTDIR}/kernel/boot/kernel .
385 This target is used while building a release; see
386 .Xr release 7 .
387 .It Cm packagekernel
388 Archive the results of
389 .Cm distributekernel ,
390 placing the results in
391 .Va DISTDIR .
392 This target is used while building a release; see
393 .Xr release 7 .
394 .It Cm kernel
395 Equivalent to
396 .Cm buildkernel
397 followed by
398 .Cm installkernel
399 .It Cm kernel-toolchain
400 Rebuild the tools needed for kernel compilation.
401 Use this if you did not do a
402 .Cm buildworld
403 first.
404 .It Cm reinstallkernel
405 Reinstall the kernel and the kernel modules, overwriting the contents
406 of the target directory.
407 As with the
408 .Cm installkernel
409 target, the target directory can be specified using the
410 .Xr make 1
411 variable
412 .Va INSTKERNNAME .
413 .El
414 .Pp
415 Convenience targets for cleaning up the install destination directory
416 denoted by variable
417 .Va DESTDIR
418 include:
419 .Bl -tag -width ".Cm delete-old-libs"
420 .It Cm check-old
421 Print a list of old files and directories in the system.
422 .It Cm delete-old
423 Delete obsolete base system files and directories interactively.
424 When
425 .Li -DBATCH_DELETE_OLD_FILES
426 is specified at the command line, the delete operation will be
427 non-interactive.
428 The variables
429 .Va DESTDIR ,
430 .Va TARGET_ARCH
431 and
432 .Va TARGET
433 should be set as with
434 .Dq Li "make installworld" .
435 .It Cm delete-old-libs
436 Delete obsolete base system libraries interactively.
437 This target should only be used if no third party software uses these
438 libraries.
439 When
440 .Li -DBATCH_DELETE_OLD_FILES
441 is specified at the command line, the delete operation will be
442 non-interactive.
443 The variables
444 .Va DESTDIR ,
445 .Va TARGET_ARCH
446 and
447 .Va TARGET
448 should be set as with
449 .Dq Li "make installworld" .
450 .El
451 .Sh ENVIRONMENT
452 Variables that influence all builds include:
453 .Bl -tag -width ".Va MAKEOBJDIRPREFIX"
454 .It Va DEBUG_FLAGS
455 Defines a set of debugging flags that will be used to build all userland
456 binaries under
457 .Pa /usr/src .
458 When
459 .Va DEBUG_FLAGS
460 is defined, the
461 .Cm install
462 and
463 .Cm installworld
464 targets install binaries from the current
465 .Va MAKEOBJDIRPREFIX
466 without stripping,
467 so that debugging information is retained in the installed binaries.
468 .It Va DESTDIR
469 The directory hierarchy prefix where built objects will be installed.
470 If not set,
471 .Va DESTDIR
472 defaults to the empty string.
473 .It Va MAKEOBJDIRPREFIX
474 Defines the prefix for directory names in the tree of built objects.
475 Defaults to
476 .Pa /usr/obj
477 if not defined.
478 This variable should only be set in the environment or
479 .Pa /etc/src-env.conf
480 and not via
481 .Pa /etc/make.conf
482 or
483 .Pa /etc/src.conf
484 or the command line.
485 .It Va NO_WERROR
486 If defined, compiler warnings will not cause the build to halt,
487 even if the makefile says otherwise.
488 .It Va WITH_CTF
489 If defined, the build process will run the DTrace CTF conversion
490 tools on built objects.
491 .El
492 .Pp
493 Additionally, builds in
494 .Pa /usr/src
495 are influenced by the following
496 .Xr make 1
497 variables:
498 .Bl -tag -width ".Va SUBDIR_OVERRIDE"
499 .It Va KERNCONF
500 Overrides which kernel to build and install for the various kernel
501 make targets.
502 It defaults to
503 .Cm GENERIC .
504 .It Va KERNCONFDIR
505 Overrides the directory in which
506 .Va KERNCONF
507 and any files included by
508 .Va KERNCONF
509 should be found.
510 Defaults to
511 .Pa sys/${ARCH}/conf .
512 .It Va KERNFAST
513 If set, the build target
514 .Cm buildkernel
515 defaults to setting
516 .Va NO_KERNELCLEAN ,
517 .Va NO_KERNELCONFIG ,
518 and
519 .Va NO_KERNELOBJ .
520 When set to a value other than
521 .Cm 1
522 then
523 .Va KERNCONF
524 is set to the value of
525 .Va KERNFAST .
526 .It Va LOCAL_DIRS
527 If set, this variable supplies a list of additional directories relative to
528 the root of the source tree to build as part of the
529 .Cm everything
530 target.
531 The directories are built in parallel with each other,
532 and with the base system directories.
533 Insert a
534 .Va .WAIT
535 directive at the beginning of the
536 .Va LOCAL_DIRS
537 list to ensure all base system directories are built first.
538 .Va .WAIT
539 may also be used as needed elsewhere within the list.
540 .It Va LOCAL_ITOOLS
541 If set, this variable supplies a list of additional tools that are used by the
542 .Cm installworld
543 and
544 .Cm distributeworld
545 targets.
546 .It Va LOCAL_LIB_DIRS
547 If set, this variable supplies a list of additional directories relative to
548 the root of the source tree to build as part of the
549 .Cm libraries
550 target.
551 The directories are built in parallel with each other,
552 and with the base system libraries.
553 Insert a
554 .Va .WAIT
555 directive at the beginning of the
556 .Va LOCAL_DIRS
557 list to ensure all base system libraries are built first.
558 .Va .WAIT
559 may also be used as needed elsewhere within the list.
560 .It Va LOCAL_MTREE
561 If set, this variable supplies a list of additional mtrees relative to the
562 root of the source tree to use as part of the
563 .Cm hierarchy
564 target.
565 .It Va LOCAL_TOOL_DIRS
566 If set, this variable supplies a list of additional directories relative to
567 the root of the source tree to build as part of the
568 .Cm build-tools
569 target.
570 .It Va LOCAL_XTOOL_DIRS
571 If set, this variable supplies a list of additional directories relative to
572 the root of the source tree to build as part of the
573 .Cm cross-tools
574 target.
575 .It Va PORTS_MODULES
576 A list of ports with kernel modules that should be built and installed
577 as part of the
578 .Cm buildkernel
579 and
580 .Cm installkernel
581 process.
582 .Bd -literal -offset indent
583 make PORTS_MODULES=emulators/kqemu-kmod kernel
584 .Ed
585 .It Va SRCCONF
586 Specify a file to override the default
587 .Pa /etc/src.conf .
588 The src.conf file controls the components to build.
589 See
590 .Xr src.conf 5
591 .It Va STRIPBIN
592 Command to use at install time when stripping binaries.
593 Be sure to add any additional tools required to run
594 .Va STRIPBIN
595 to the
596 .Va LOCAL_ITOOLS
597 .Xr make 1
598 variable before running the
599 .Cm distributeworld
600 or
601 .Cm installworld
602 targets.
603 See
604 .Xr install 1
605 for more details.
606 .It Va SUBDIR_OVERRIDE
607 Override the default list of sub-directories and only build the
608 sub-directory named in this variable.
609 If combined with
610 .Cm buildworld
611 then all libraries and includes, and some of the build tools will still build
612 as well.
613 Specifying
614 .Cm -DNO_LIBS ,
615 and
616 .Cm -DWORLDFAST
617 will only build the specified directory as was done historically.
618 When combined with
619 .Cm buildworld
620 it is necesarry to override
621 .Va LOCAL_LIB_DIRS
622 with any custom directories containing libraries.
623 This allows building a subset of the system in the same way as
624 .Cm buildworld
625 does using its sysroot handling.
626 This variable can also be useful when debugging failed builds.
627 .Bd -literal -offset indent
628 make some-target SUBDIR_OVERRIDE=foo/bar
629 .Ed
630 .It Va TARGET
631 The target hardware platform.
632 This is analogous to the
633 .Dq Nm uname Fl m
634 output.
635 This is necessary to cross-build some target architectures.
636 For example, cross-building for ARM64 machines requires
637 .Va TARGET_ARCH Ns = Ns Li aarch64
638 and
639 .Va TARGET Ns = Ns Li arm64 .
640 If not set,
641 .Va TARGET
642 defaults to the current hardware platform, unless
643 .Va TARGET_ARCH
644 is also set, in which case it defaults to the appropriate
645 value for that architecture.
646 .It Va TARGET_ARCH
647 The target machine processor architecture.
648 This is analogous to the
649 .Dq Nm uname Fl p
650 output.
651 Set this to cross-build for a different architecture.
652 If not set,
653 .Va TARGET_ARCH
654 defaults to the current machine architecture, unless
655 .Va TARGET
656 is also set, in which case it defaults to the appropriate
657 value for that platform.
658 Typically, one only needs to set
659 .Va TARGET .
660 .El
661 .Pp
662 Builds under directory
663 .Pa /usr/src
664 are also influenced by defining one or more of the following symbols,
665 using the
666 .Fl D
667 option of
668 .Xr make 1 :
669 .Bl -tag -width ".Va -DNO_KERNELCONFIG"
670 .It Va LOADER_DEFAULT_INTERP
671 Defines what interpreter the default loader program will have.
672 Valid values include
673 .Dq 4th ,
674 .Dq lua ,
675 and
676 .Dq simp .
677 This creates the default link for
678 .Pa /boot/loader
679 to the loader with that interpreter.
680 It also determines what interpreter is compiled into
681 .Pa userboot .
682 .It Va NO_CLEANDIR
683 If set, the build targets that clean parts of the object tree use the
684 equivalent of
685 .Dq make clean
686 instead of
687 .Dq make cleandir .
688 .It Va NO_CLEAN
689 If set, no object tree files are cleaned at all.
690 This is the default when
691 .Va WITH_META_MODE
692 is used with
693 .Xr filemon 4
694 loaded.
695 See
696 .Xr src.conf 5
697 for more details.
698 Setting
699 .Va NO_CLEAN
700 implies
701 .Va NO_KERNELCLEAN ,
702 so when
703 .Va NO_CLEAN
704 is set no kernel objects are cleaned either.
705 .It Va NO_CTF
706 If set, the build process does not run the DTrace CTF conversion tools
707 on built objects.
708 .It Va NO_SHARE
709 If set, the build does not descend into the
710 .Pa /usr/src/share
711 subdirectory (i.e., manual pages, locale data files, timezone data files and
712 other
713 .Pa /usr/src/share
714 files will not be rebuild from their sources).
715 .It Va NO_KERNELCLEAN
716 If set, the build process does not run
717 .Dq make clean
718 as part of the
719 .Cm buildkernel
720 target.
721 .It Va NO_KERNELCONFIG
722 If set, the build process does not run
723 .Xr config 8
724 as part of the
725 .Cm buildkernel
726 target.
727 .It Va NO_KERNELOBJ
728 If set, the build process does not run
729 .Dq make obj
730 as part of the
731 .Cm buildkernel
732 target.
733 .It Va NO_DOCUPDATE
734 If set, the update process does not update the source of the
735 .Fx
736 documentation as part of the
737 .Dq make update
738 target.
739 .It Va NO_LIBS
740 If set, the libraries phase will be skipped.
741 .It Va NO_OBJWALK
742 If set, no object directories will be created.
743 This should only be used if object directories were created in a
744 previous build and no new directories are connected.
745 .It Va NO_PORTSUPDATE
746 If set, the update process does not update the Ports tree as part of the
747 .Dq make update
748 target.
749 .It Va NO_WWWUPDATE
750 If set, the update process does not update the www tree as part of the
751 .Dq make update
752 target.
753 .It Va WORLDFAST
754 If set, the build target
755 .Cm buildworld
756 defaults to setting
757 .Va NO_CLEAN ,
758 .Va NO_OBJWALK ,
759 and will skip most bootstrap phases.
760 It will only bootstrap libraries and build all of userland.
761 This option should be used only when it is known that none of the bootstrap
762 needs changed and that no new directories have been connected to the build.
763 .El
764 .Pp
765 Builds under directory
766 .Pa /usr/doc
767 are influenced by the following
768 .Xr make 1
769 variables:
770 .Bl -tag -width ".Va DOC_LANG"
771 .It Va DOC_LANG
772 If set, restricts the documentation build to the language subdirectories
773 specified as its content.
774 The default action is to build documentation for all languages.
775 .El
776 .Pp
777 Builds using the
778 .Cm universe
779 target are influenced by the following
780 .Xr make 1
781 variables:
782 .Bl -tag -width ".Va MAKE_JUST_KERNELS"
783 .It Va JFLAG
784 Pass the value of this variable to each
785 .Xr make 1
786 invocation used to build worlds and kernels.
787 This can be used to enable multiple jobs within a single architecture's build
788 while still building each architecture serially.
789 .It Va MAKE_JUST_KERNELS
790 Only build kernels for each supported architecture.
791 .It Va MAKE_JUST_WORLDS
792 Only build worlds for each supported architecture.
793 .It Va UNIVERSE_TARGET
794 Execute the specified
795 .Xr make 1
796 target for each supported architecture instead of the default action of
797 building a world and one or more kernels.
798 .El
799 .Sh FILES
800 .Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact
801 .It Pa /usr/doc/Makefile
802 .It Pa /usr/doc/share/mk/doc.project.mk
803 .It Pa /usr/ports/Mk/bsd.port.mk
804 .It Pa /usr/ports/Mk/bsd.sites.mk
805 .It Pa /usr/share/examples/etc/make.conf
806 .It Pa /usr/src/Makefile
807 .It Pa /usr/src/Makefile.inc1
808 .El
809 .Sh EXAMPLES
810 For an
811 .Dq approved
812 method of updating your system from the latest sources, please see the
813 .Sx COMMON ITEMS
814 section in
815 .Pa src/UPDATING .
816 .Pp
817 The following sequence of commands can be used to cross-build the
818 system for the armv6 architecture on an amd64 host:
819 .Bd -literal -offset indent
820 cd /usr/src
821 make TARGET_ARCH=armv6 buildworld buildkernel
822 make TARGET_ARCH=armv6 DESTDIR=/clients/arm64 installworld installkernel
823 .Ed
824 .Sh SEE ALSO
825 .Xr cc 1 ,
826 .Xr install 1 ,
827 .Xr make 1 ,
828 .Xr svn 1 ,
829 .Xr svnlite 1 ,
830 .Xr make.conf 5 ,
831 .Xr src.conf 5 ,
832 .Xr arch 7 ,
833 .Xr ports 7 ,
834 .Xr release 7 ,
835 .Xr tests 7 ,
836 .Xr config 8 ,
837 .Xr mergemaster 8 ,
838 .Xr portsnap 8 ,
839 .Xr reboot 8 ,
840 .Xr shutdown 8
841 .Sh AUTHORS
842 .An Mike W. Meyer Aq Mt mwm@mired.org