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