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