4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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.
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
25 .\" $FreeBSD: src/share/man/man7/build.7,v 1.19.2.1 2002/03/18 08:33:02 murray Exp $
32 .Nd information on how to build the system
36 system and applications are contained in three different directories,
45 sources, which is loosely defined as the things required to rebuild
46 the system to a useful state.
48 contains the source for the system documentation, excluding the manual
51 is a tree that provides a consistent interface for building and
52 installing third party applications.
56 command is used in each of these directories to build and install the
57 things in that directory. Issuing the make command in any directory or
58 subdirectory of those directories has the same effect as issuing the
59 same command in all subdirectories of that directory. With no target
60 specified, the things in that directory are just built. The following
61 list provides the names and actions for other targets:
64 Removes any files created during the build process.
66 Installs the results of the build for this directory.
68 Gets updated sources as configured in
77 Rebuild everything but the kernel, configure files in
81 Install everything built by
84 buildworld + installworld.
86 Rebuild the kernel and the kernel-modules.
88 Install the kernel and the kernel-modules.
89 .It Ar reinstallkernel
90 Reinstall the kernel and the kernel-modules.
92 Upgrade a.out (2.2.x/3.0) system to the new ELF way
94 Build user commands, no libraries or include files.
96 Install user commands, no libraries or include files.
98 Upgrade an system from a.out to elf format.
99 .It Ar aout-to-elf-build
100 Build everything required to upgrade a system from a.out to elf format.
101 .It Ar aout-to-elf-install
102 Install everything built by aout-to-elf-build.
103 .It Ar move-aout-libs
104 Move the a.out libraries into an aout sub-directory of each elf
105 library sub-directory.
108 For more information about the ports build process, see
111 .Bl -tag -width ".Va TARGET_ARCH"
113 The target machine processor architecture.
114 This is analogous to the
117 Set this to cross-build for a different architecture.
119 The target hardware platform.
120 This is analogous to the
123 This is necessary to cross-build some target architectures.
124 For example, cross-building for PC98 machines requires
125 .Va "TARGET_ARCH=i386"
129 If defined, warnings will not cause the build to halt, even if the
130 makefile says otherwise.
132 The directory hierarchy where the resulting binaries will be
136 .Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact
137 .It Pa /etc/make.conf
138 .It Pa /usr/doc/Makefile
139 .It Pa /usr/doc/share/mk/doc.project.mk
140 .It Pa /usr/ports/Mk/bsd.port.mk
141 .It Pa /usr/ports/Mk/bsd.sites.mk
142 .It Pa /usr/share/examples/etc//make.conf
143 .It Pa /usr/src/Makefile
144 .It Pa /usr/src/Makefile.inc1
149 method of updating your system from the latest sources is:
150 .Bd -literal -offset indent
152 make buildkernel KERNCONF=FOO
153 make installkernel KERNCONF=FOO
159 must be replaced with the name of the kernel configuration file from which
160 the kernel should be built.
165 can be set to the name of the kernel to build;
172 commands can be omitted.
174 After running these commands a system reboot is required,
175 otherwise many programs which have been rebuilt
180 may not work with the old kernel which is still running.
182 The following sequence of commands can be used to cross-build the
183 system for the Alpha architecture on an i386 host:
184 .Bd -literal -offset indent
186 make TARGET_ARCH=alpha buildworld
187 make TARGET_ARCH=alpha DESTDIR=/clients/axp installworld
200 .An Mike W. Meyer Aq mwm@mired.org .