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