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