]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man7/build.7
Import device-tree files from Linux 5.13
[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 May 15, 2021
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 Git
44 .Po installed from packages with
45 .Xr pkg 7
46 or from
47 .Xr ports 7 Pc .
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 kernels
302 Like
303 .Cm universe
304 with
305 .Va WITHOUT_WORLDS
306 defined so only the kernels for each architecture are built.
307 .It Cm worlds
308 Like
309 .Cm universe
310 with
311 .Va WITHOUT_KERNELS
312 defined so only the worlds for each architecture are built.
313 .It Cm update
314 Get updated sources as configured in
315 .Xr make.conf 5 .
316 .It Cm targets
317 Print a list of supported
318 .Va TARGET
319 /
320 .Va TARGET_ARCH
321 pairs for world and kernel targets.
322 .It Cm tinderbox
323 Execute the same targets as
324 .Cm universe .
325 In addition print a summary of all failed targets at the end and
326 exit with an error if there were any.
327 .It Cm toolchains
328 Create a build toolchain for each architecture supported by the build system.
329 .It Cm xdev
330 Builds and installs a cross-toolchain and sysroot for the given
331 .Sy TARGET
332 and
333 .Sy TARGET_ARCH .
334 The sysroot contains target library and headers.
335 The target is an alias for
336 .Cm xdev-build
337 and
338 .Cm xdev-install .
339 The location of the files installed can be controlled with
340 .Va DESTDIR .
341 The target location in
342 .Va DESTDIR
343 is
344 .Pa ${DESTDIR}/${XDTP}
345 where
346 .Va XDTP
347 defaults to
348 .Pa /usr/${XDDIR}
349 and
350 .Va XDDIR
351 defaults to
352 .Pa ${TARGET_ARCH}-freebsd .
353 .It Cm xdev-build
354 Builds for the
355 .Cm xdev
356 target.
357 .It Cm xdev-install
358 Installs the files for the
359 .Cm xdev
360 target.
361 .It Cm xdev-links
362 Installs autoconf-style symlinks to
363 .Pa ${DESTDIR}/usr/bin
364 pointing into the xdev toolchain in
365 .Pa ${DESTDIR}/${XDTP} .
366 .El
367 .Pp
368 Kernel specific build targets in
369 .Pa /usr/src
370 are:
371 .Bl -tag -width ".Cm distributekernel"
372 .It Cm buildkernel
373 Rebuild the kernel and the kernel modules.
374 The object directory can be changed from the default
375 .Pa /usr/obj
376 by setting the
377 .Pa MAKEOBJDIRPREFIX
378 .Xr make 1
379 variable.
380 .It Cm installkernel
381 Install the kernel and the kernel modules to directory
382 .Pa ${DESTDIR}/boot/kernel ,
383 renaming any pre-existing directory with this name to
384 .Pa kernel.old
385 if it contained the currently running kernel.
386 The target directory under
387 .Pa ${DESTDIR}
388 may be modified using the
389 .Va INSTKERNNAME
390 and
391 .Va KODIR
392 .Xr make 1
393 variables.
394 .It Cm distributekernel
395 Install the kernel to the directory
396 .Pa ${DISTDIR}/kernel/boot/kernel .
397 This target is used while building a release; see
398 .Xr release 7 .
399 .It Cm packagekernel
400 Archive the results of
401 .Cm distributekernel ,
402 placing the results in
403 .Va DISTDIR .
404 This target is used while building a release; see
405 .Xr release 7 .
406 .It Cm kernel
407 Equivalent to
408 .Cm buildkernel
409 followed by
410 .Cm installkernel
411 .It Cm kernel-toolchain
412 Rebuild the tools needed for kernel compilation.
413 Use this if you did not do a
414 .Cm buildworld
415 first.
416 .It Cm reinstallkernel
417 Reinstall the kernel and the kernel modules, overwriting the contents
418 of the target directory.
419 As with the
420 .Cm installkernel
421 target, the target directory can be specified using the
422 .Xr make 1
423 variable
424 .Va INSTKERNNAME .
425 .El
426 .Pp
427 Convenience targets for cleaning up the install destination directory
428 denoted by variable
429 .Va DESTDIR
430 include:
431 .Bl -tag -width ".Cm delete-old-libs"
432 .It Cm check-old
433 Print a list of old files and directories in the system.
434 .It Cm delete-old
435 Delete obsolete base system files and directories interactively.
436 When
437 .Li -DBATCH_DELETE_OLD_FILES
438 is specified at the command line, the delete operation will be
439 non-interactive.
440 The variables
441 .Va DESTDIR ,
442 .Va TARGET_ARCH
443 and
444 .Va TARGET
445 should be set as with
446 .Dq Li "make installworld" .
447 .It Cm delete-old-libs
448 Delete obsolete base system libraries interactively.
449 This target should only be used if no third party software uses these
450 libraries.
451 When
452 .Li -DBATCH_DELETE_OLD_FILES
453 is specified at the command line, the delete operation will be
454 non-interactive.
455 The variables
456 .Va DESTDIR ,
457 .Va TARGET_ARCH
458 and
459 .Va TARGET
460 should be set as with
461 .Dq Li "make installworld" .
462 .El
463 .Sh ENVIRONMENT
464 Variables that influence all builds include:
465 .Bl -tag -width ".Va MAKEOBJDIRPREFIX"
466 .It Va DEBUG_FLAGS
467 Defines a set of debugging flags that will be used to build all userland
468 binaries under
469 .Pa /usr/src .
470 When
471 .Va DEBUG_FLAGS
472 is defined, the
473 .Cm install
474 and
475 .Cm installworld
476 targets install binaries from the current
477 .Va MAKEOBJDIRPREFIX
478 without stripping,
479 so that debugging information is retained in the installed binaries.
480 .It Va DESTDIR
481 The directory hierarchy prefix where built objects will be installed.
482 If not set,
483 .Va DESTDIR
484 defaults to the empty string.
485 .It Va MAKEOBJDIRPREFIX
486 Defines the prefix for directory names in the tree of built objects.
487 Defaults to
488 .Pa /usr/obj
489 if not defined.
490 This variable should only be set in the environment or
491 .Pa /etc/src-env.conf
492 and not via
493 .Pa /etc/make.conf
494 or
495 .Pa /etc/src.conf
496 or the command line.
497 .It Va WITHOUT_WERROR
498 If defined, compiler warnings will not cause the build to halt,
499 even if the makefile says otherwise.
500 .It Va WITH_CTF
501 If defined, the build process will run the DTrace CTF conversion
502 tools on built objects.
503 .El
504 .Pp
505 Additionally, builds in
506 .Pa /usr/src
507 are influenced by the following
508 .Xr make 1
509 variables:
510 .Bl -tag -width ".Va SUBDIR_OVERRIDE"
511 .It Va KERNCONF
512 Overrides which kernel to build and install for the various kernel
513 make targets.
514 It defaults to
515 .Cm GENERIC .
516 .It Va KERNCONFDIR
517 Overrides the directory in which
518 .Va KERNCONF
519 and any files included by
520 .Va KERNCONF
521 should be found.
522 Defaults to
523 .Pa sys/${ARCH}/conf .
524 .It Va KERNFAST
525 If set, the build target
526 .Cm buildkernel
527 defaults to setting
528 .Va NO_KERNELCLEAN ,
529 .Va NO_KERNELCONFIG ,
530 and
531 .Va NO_KERNELOBJ .
532 When set to a value other than
533 .Cm 1
534 then
535 .Va KERNCONF
536 is set to the value of
537 .Va KERNFAST .
538 .It Va LOCAL_DIRS
539 If set, this variable supplies a list of additional directories relative to
540 the root of the source tree to build as part of the
541 .Cm everything
542 target.
543 The directories are built in parallel with each other,
544 and with the base system directories.
545 Insert a
546 .Va .WAIT
547 directive at the beginning of the
548 .Va LOCAL_DIRS
549 list to ensure all base system directories are built first.
550 .Va .WAIT
551 may also be used as needed elsewhere within the list.
552 .It Va LOCAL_ITOOLS
553 If set, this variable supplies a list of additional tools that are used by the
554 .Cm installworld
555 and
556 .Cm distributeworld
557 targets.
558 .It Va LOCAL_LIB_DIRS
559 If set, this variable supplies a list of additional directories relative to
560 the root of the source tree to build as part of the
561 .Cm libraries
562 target.
563 The directories are built in parallel with each other,
564 and with the base system libraries.
565 Insert a
566 .Va .WAIT
567 directive at the beginning of the
568 .Va LOCAL_DIRS
569 list to ensure all base system libraries are built first.
570 .Va .WAIT
571 may also be used as needed elsewhere within the list.
572 .It Va LOCAL_MTREE
573 If set, this variable supplies a list of additional mtrees relative to the
574 root of the source tree to use as part of the
575 .Cm hierarchy
576 target.
577 .It Va LOCAL_LEGACY_DIRS
578 If set, this variable supplies a list of additional directories relative to
579 the root of the source tree to build as part of the
580 .Cm legacy
581 target.
582 .It Va LOCAL_BSTOOL_DIRS
583 If set, this variable supplies a list of additional directories relative to
584 the root of the source tree to build as part of the
585 .Cm bootstrap-tools
586 target.
587 .It Va LOCAL_TOOL_DIRS
588 If set, this variable supplies a list of additional directories relative to
589 the root of the source tree to build as part of the
590 .Cm build-tools
591 target.
592 .It Va LOCAL_XTOOL_DIRS
593 If set, this variable supplies a list of additional directories relative to
594 the root of the source tree to build as part of the
595 .Cm cross-tools
596 target.
597 .It Va PORTS_MODULES
598 A list of ports with kernel modules that should be built and installed
599 as part of the
600 .Cm buildkernel
601 and
602 .Cm installkernel
603 process.
604 .Bd -literal -offset indent
605 make PORTS_MODULES=emulators/virtualbox-ose-kmod kernel
606 .Ed
607 .It Va SRCCONF
608 Specify a file to override the default
609 .Pa /etc/src.conf .
610 The src.conf file controls the components to build.
611 See
612 .Xr src.conf 5
613 .It Va STRIPBIN
614 Command to use at install time when stripping binaries.
615 Be sure to add any additional tools required to run
616 .Va STRIPBIN
617 to the
618 .Va LOCAL_ITOOLS
619 .Xr make 1
620 variable before running the
621 .Cm distributeworld
622 or
623 .Cm installworld
624 targets.
625 See
626 .Xr install 1
627 for more details.
628 .It Va SUBDIR_OVERRIDE
629 Override the default list of sub-directories and only build the
630 sub-directory named in this variable.
631 If combined with
632 .Cm buildworld
633 then all libraries and includes, and some of the build tools will still build
634 as well.
635 Specifying
636 .Cm -DNO_LIBS ,
637 and
638 .Cm -DWORLDFAST
639 will only build the specified directory as was done historically.
640 When combined with
641 .Cm buildworld
642 it is necesarry to override
643 .Va LOCAL_LIB_DIRS
644 with any custom directories containing libraries.
645 This allows building a subset of the system in the same way as
646 .Cm buildworld
647 does using its sysroot handling.
648 This variable can also be useful when debugging failed builds.
649 .Bd -literal -offset indent
650 make some-target SUBDIR_OVERRIDE=foo/bar
651 .Ed
652 .It Va SYSDIR
653 Specify the location of the kernel source to override the default
654 .Pa /usr/src/sys .
655 The kernel source is located in the
656 .Pa sys
657 subdirectory of the source tree checked out from the
658 .Pa src.git
659 repository.
660 .It Va TARGET
661 The target hardware platform.
662 This is analogous to the
663 .Dq Nm uname Fl m
664 output.
665 This is necessary to cross-build some target architectures.
666 For example, cross-building for ARM64 machines requires
667 .Va TARGET_ARCH Ns = Ns Li aarch64
668 and
669 .Va TARGET Ns = Ns Li arm64 .
670 If not set,
671 .Va TARGET
672 defaults to the current hardware platform, unless
673 .Va TARGET_ARCH
674 is also set, in which case it defaults to the appropriate
675 value for that architecture.
676 .It Va TARGET_ARCH
677 The target machine processor architecture.
678 This is analogous to the
679 .Dq Nm uname Fl p
680 output.
681 Set this to cross-build for a different architecture.
682 If not set,
683 .Va TARGET_ARCH
684 defaults to the current machine architecture, unless
685 .Va TARGET
686 is also set, in which case it defaults to the appropriate
687 value for that platform.
688 Typically, one only needs to set
689 .Va TARGET .
690 .El
691 .Pp
692 Builds under directory
693 .Pa /usr/src
694 are also influenced by defining one or more of the following symbols,
695 using the
696 .Fl D
697 option of
698 .Xr make 1 :
699 .Bl -tag -width ".Va -DNO_KERNELCONFIG"
700 .It Va LOADER_DEFAULT_INTERP
701 Defines what interpreter the default loader program will have.
702 Valid values include
703 .Dq 4th ,
704 .Dq lua ,
705 and
706 .Dq simp .
707 This creates the default link for
708 .Pa /boot/loader
709 to the loader with that interpreter.
710 It also determines what interpreter is compiled into
711 .Pa userboot .
712 .It Va NO_CLEANDIR
713 If set, the build targets that clean parts of the object tree use the
714 equivalent of
715 .Dq make clean
716 instead of
717 .Dq make cleandir .
718 .It Va NO_CLEAN
719 If set, no object tree files are cleaned at all.
720 This is the default when
721 .Va WITH_META_MODE
722 is used with
723 .Xr filemon 4
724 loaded.
725 See
726 .Xr src.conf 5
727 for more details.
728 Setting
729 .Va NO_CLEAN
730 implies
731 .Va NO_KERNELCLEAN ,
732 so when
733 .Va NO_CLEAN
734 is set no kernel objects are cleaned either.
735 .It Va NO_CTF
736 If set, the build process does not run the DTrace CTF conversion tools
737 on built objects.
738 .It Va NO_SHARE
739 If set, the build does not descend into the
740 .Pa /usr/src/share
741 subdirectory (i.e., manual pages, locale data files, timezone data files and
742 other
743 .Pa /usr/src/share
744 files will not be rebuild from their sources).
745 .It Va NO_KERNELCLEAN
746 If set, the build process does not run
747 .Dq make clean
748 as part of the
749 .Cm buildkernel
750 target.
751 .It Va NO_KERNELCONFIG
752 If set, the build process does not run
753 .Xr config 8
754 as part of the
755 .Cm buildkernel
756 target.
757 .It Va NO_KERNELOBJ
758 If set, the build process does not run
759 .Dq make obj
760 as part of the
761 .Cm buildkernel
762 target.
763 .It Va NO_DOCUPDATE
764 If set, the update process does not update the source of the
765 .Fx
766 documentation as part of the
767 .Dq make update
768 target.
769 .It Va NO_LIBS
770 If set, the libraries phase will be skipped.
771 .It Va NO_OBJWALK
772 If set, no object directories will be created.
773 This should only be used if object directories were created in a
774 previous build and no new directories are connected.
775 .It Va NO_PORTSUPDATE
776 If set, the update process does not update the Ports tree as part of the
777 .Dq make update
778 target.
779 .It Va NO_WWWUPDATE
780 If set, the update process does not update the www tree as part of the
781 .Dq make update
782 target.
783 .It Va WORLDFAST
784 If set, the build target
785 .Cm buildworld
786 defaults to setting
787 .Va NO_CLEAN ,
788 .Va NO_OBJWALK ,
789 and will skip most bootstrap phases.
790 It will only bootstrap libraries and build all of userland.
791 This option should be used only when it is known that none of the bootstrap
792 needs changed and that no new directories have been connected to the build.
793 .El
794 .Pp
795 Builds under directory
796 .Pa /usr/doc
797 are influenced by the following
798 .Xr make 1
799 variables:
800 .Bl -tag -width ".Va DOC_LANG"
801 .It Va DOC_LANG
802 If set, restricts the documentation build to the language subdirectories
803 specified as its content.
804 The default action is to build documentation for all languages.
805 .El
806 .Pp
807 Builds using the
808 .Cm universe
809 and related targets are influenced by the following
810 .Xr make 1
811 variables:
812 .Bl -tag -width ".Va MAKE_JUST_KERNELS"
813 .It Va JFLAG
814 Pass the value of this variable to each
815 .Xr make 1
816 invocation used to build worlds and kernels.
817 This can be used to enable multiple jobs within a single architecture's build
818 while still building each architecture serially.
819 .It Va MAKE_JUST_KERNELS
820 Only build kernels for each supported architecture.
821 .It Va MAKE_JUST_WORLDS
822 Only build worlds for each supported architecture.
823 .It Va WITHOUT_WORLDS
824 Only build kernels for each supported architecture.
825 .It Va WITHOUT_KERNELS
826 Only build worlds for each supported architecture.
827 .It Va UNIVERSE_TARGET
828 Execute the specified
829 .Xr make 1
830 target for each supported architecture instead of the default action of
831 building a world and one or more kernels.
832 This variable implies
833 .Va WITHOUT_KERNELS .
834 .It Va TARGETS
835 Only build the listed targets instead of each supported architecture.
836 .It Va EXTRA_TARGETS
837 In addition to the supported architectures, build the semi-supported
838 architectures.
839 A semi-supported architecture has build support in the
840 .Fx
841 tree, but receives significantly less testing and is generally for
842 fringe uses that do not have a wide appeal.
843 .El
844 .Sh FILES
845 .Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact
846 .It Pa /usr/doc/Makefile
847 .It Pa /usr/doc/share/mk/doc.project.mk
848 .It Pa /usr/ports/Mk/bsd.port.mk
849 .It Pa /usr/ports/Mk/bsd.sites.mk
850 .It Pa /usr/share/examples/etc/make.conf
851 .It Pa /usr/src/Makefile
852 .It Pa /usr/src/Makefile.inc1
853 .El
854 .Sh EXAMPLES
855 For an
856 .Dq approved
857 method of updating your system from the latest sources, please see the
858 .Sx COMMON ITEMS
859 section in
860 .Pa src/UPDATING .
861 .Pp
862 The following sequence of commands can be used to cross-build the
863 system for the armv6 architecture on an amd64 host:
864 .Bd -literal -offset indent
865 cd /usr/src
866 make TARGET_ARCH=armv6 buildworld buildkernel
867 make TARGET_ARCH=armv6 DESTDIR=/clients/arm installworld installkernel
868 .Ed
869 .Sh HISTORY
870 The
871 .Nm
872 manpage first appeared in
873 .Fx 4.3 .
874 .Sh SEE ALSO
875 .Xr cc 1 ,
876 .Xr install 1 ,
877 .Xr make 1 ,
878 .Xr make.conf 5 ,
879 .Xr src.conf 5 ,
880 .Xr arch 7 ,
881 .Xr pkg 7 ,
882 .Xr ports 7 ,
883 .Xr release 7 ,
884 .Xr tests 7 ,
885 .Xr config 8 ,
886 .Xr etcupdate 8 ,
887 .Xr mergemaster 8 ,
888 .Xr reboot 8 ,
889 .Xr shutdown 8
890 .Sh AUTHORS
891 .An Mike W. Meyer Aq Mt mwm@mired.org