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