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