1786aa69aSBen Smithurst.\" Copyright (c) 2000 2786aa69aSBen Smithurst.\" Mike W. Meyer 3786aa69aSBen Smithurst.\" 4786aa69aSBen Smithurst.\" Redistribution and use in source and binary forms, with or without 5786aa69aSBen Smithurst.\" modification, are permitted provided that the following conditions 6786aa69aSBen Smithurst.\" are met: 7786aa69aSBen Smithurst.\" 1. Redistributions of source code must retain the above copyright 8786aa69aSBen Smithurst.\" notice, this list of conditions and the following disclaimer. 9786aa69aSBen Smithurst.\" 2. Redistributions in binary form must reproduce the above copyright 10786aa69aSBen Smithurst.\" notice, this list of conditions and the following disclaimer in the 11786aa69aSBen Smithurst.\" documentation and/or other materials provided with the distribution. 12786aa69aSBen Smithurst.\" 13786aa69aSBen Smithurst.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND 14786aa69aSBen Smithurst.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15786aa69aSBen Smithurst.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16786aa69aSBen Smithurst.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE 17786aa69aSBen Smithurst.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18786aa69aSBen Smithurst.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19786aa69aSBen Smithurst.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20786aa69aSBen Smithurst.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21786aa69aSBen Smithurst.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22786aa69aSBen Smithurst.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23786aa69aSBen Smithurst.\" SUCH DAMAGE. 24786aa69aSBen Smithurst.\" 25786aa69aSBen Smithurst.\" $FreeBSD$ 26786aa69aSBen Smithurst.\" 27d7b336c0SRuslan Ermilov.Dd November 4, 2000 28786aa69aSBen Smithurst.Dt BUILD 7 29d003b779SRuslan Ermilov.Os FreeBSD 30786aa69aSBen Smithurst.Sh NAME 31786aa69aSBen Smithurst.Nm build 32786aa69aSBen Smithurst.Nd information on how to build the system. 33786aa69aSBen Smithurst.Sh DESCRIPTION 34786aa69aSBen SmithurstThe source for the 35d003b779SRuslan Ermilov.Fx 36786aa69aSBen Smithurstsystem and applications are contained in three different directories, 37786aa69aSBen Smithurstnormally 38786aa69aSBen Smithurst.Pa /usr/src , 39786aa69aSBen Smithurst.Pa /usr/doc , 40786aa69aSBen Smithurstand 41786aa69aSBen Smithurst.Pa /usr/ports . 42786aa69aSBen Smithurst.Pa /usr/src 43786aa69aSBen Smithurstcontains the 44786aa69aSBen Smithurst.Dq "base system" 45786aa69aSBen Smithurstsources, which is loosely defined as the things required to rebuild 46786aa69aSBen Smithurstthe system to a useful state. 47786aa69aSBen Smithurst.Pa /usr/doc 48786aa69aSBen Smithurstcontains the source for the system documentation, excluding the manual 49786aa69aSBen Smithurstpages. 50786aa69aSBen Smithurst.Pa /usr/ports 51786aa69aSBen Smithurstis a tree that provides a consistent interface for building and 52786aa69aSBen Smithurstinstalling third party applications. 53786aa69aSBen Smithurst.Pp 54786aa69aSBen SmithurstThe 55786aa69aSBen Smithurst.Xr make 1 56786aa69aSBen Smithurstcommand is used in each of these directories to build and install the 57786aa69aSBen Smithurstthings in that directory. Issuing the make command in any directory or 58786aa69aSBen Smithurstsubdirectory of those directories has the same effect as issuing the 59786aa69aSBen Smithurstsame command in all subdirectories of that directory. With no target 60786aa69aSBen Smithurstspecified, the things in that directory are just built. The following 61786aa69aSBen Smithurstlist provides the names and actions for other targets: 62786aa69aSBen Smithurst.Bl -tag -width Ar 63786aa69aSBen Smithurst.It Ar clean 64786aa69aSBen SmithurstRemoves any files created during the build process. 65786aa69aSBen Smithurst.It Ar install 66786aa69aSBen SmithurstInstalls the results of the build for this directory. 67786aa69aSBen Smithurst.It Ar update 68786aa69aSBen SmithurstGets updated sources as configured in 69786aa69aSBen Smithurst.Pa /etc/make.conf . 70786aa69aSBen Smithurst.El 71786aa69aSBen Smithurst.Pp 72786aa69aSBen SmithurstThe other 73786aa69aSBen Smithurst.Pa /usr/src 74786aa69aSBen Smithurstmake targets are: 75786aa69aSBen Smithurst.Bl -tag -width Ar 76786aa69aSBen Smithurst.It Ar buildworld 77786aa69aSBen SmithurstRebuild everything but the kernel, configure files in 78786aa69aSBen Smithurst.Pa /etc , 79786aa69aSBen Smithurstand release. 80786aa69aSBen Smithurst.It Ar installworld 81786aa69aSBen SmithurstInstall everything built by 82786aa69aSBen Smithurst.Dq buildworld . 83786aa69aSBen Smithurst.It Ar world 84786aa69aSBen Smithurstbuildworld + installworld. 85786aa69aSBen Smithurst.It Ar buildkernel 86786aa69aSBen SmithurstRebuild the kernel and the kernel-modules. 87786aa69aSBen Smithurst.It Ar installkernel 88786aa69aSBen SmithurstInstall the kernel and the kernel-modules. 89786aa69aSBen Smithurst.It Ar reinstallkernel 90786aa69aSBen SmithurstReinstall the kernel and the kernel-modules. 91786aa69aSBen Smithurst.It Ar upgrade 92786aa69aSBen SmithurstUpgrade a.out (2.2.x/3.0) system to the new ELF way 93786aa69aSBen Smithurst.It Ar most 94786aa69aSBen SmithurstBuild user commands, no libraries or include files. 95786aa69aSBen Smithurst.It Ar installmost 96786aa69aSBen SmithurstInstall user commands, no libraries or include files. 97786aa69aSBen Smithurst.It Ar aout-to-elf 98786aa69aSBen SmithurstUpgrade an system from a.out to elf format. 99786aa69aSBen Smithurst.It Ar aout-to-elf-build 100786aa69aSBen SmithurstBuild everything required to upgrade a system from a.out to elf format. 101786aa69aSBen Smithurst.It Ar aout-to-elf-install 102786aa69aSBen SmithurstInstall everything built by aout-to-elf-build. 103786aa69aSBen Smithurst.It Ar move-aout-libs 104786aa69aSBen SmithurstMove the a.out libraries into an aout sub-directory of each elf 105786aa69aSBen Smithurstlibrary sub-directory. 106786aa69aSBen Smithurst.El 107786aa69aSBen Smithurst.Pp 108786aa69aSBen SmithurstFor more information about the ports build process, see 109786aa69aSBen Smithurst.Xr ports 7 . 110786aa69aSBen Smithurst.Sh FILES 111786aa69aSBen Smithurst.Bl -tag -width /etc/defaults/make.conf -compact 112786aa69aSBen Smithurst.It Pa /etc/defaults/make.conf 113786aa69aSBen Smithurst.It Pa /etc/make.conf 114786aa69aSBen Smithurst.It Pa /usr/doc/Makefile 115786aa69aSBen Smithurst.It Pa /usr/doc/share/mk/doc.project.mk 116786aa69aSBen Smithurst.It Pa /usr/src/Makefile 117786aa69aSBen Smithurst.It Pa /usr/src/Makefile.inc1 118786aa69aSBen Smithurst.It Pa /usr/ports/Mk/bsd.port.mk 119786aa69aSBen Smithurst.It Pa /usr/ports/Mk/bsd.sites.mk 1203faf5fc9SBen Smithurst.Sh EXAMPLES 1213faf5fc9SBen SmithurstThe 1223faf5fc9SBen Smithurst.Dq approved 1233faf5fc9SBen Smithurstmethod of updating your system from the latest sources is: 1243faf5fc9SBen Smithurst.Bd -literal -offset indent 1253faf5fc9SBen Smithurstmake buildworld 1263faf5fc9SBen Smithurstmake buildkernel KERNEL=FOO 1273faf5fc9SBen Smithurstmake installkernel KERNEL=FOO 1283faf5fc9SBen Smithurstmake installworld 12947f77d8cSBen Smithurstmergemaster 1303faf5fc9SBen Smithurst.Ed 1313faf5fc9SBen Smithurst.Pp 1323faf5fc9SBen Smithurst.Dq FOO 1333faf5fc9SBen Smithurstmust be replaced with the name of the kernel configuration file from which 1343faf5fc9SBen Smithurstthe kernel should be built. 1353faf5fc9SBen SmithurstAlternatively, the 1363faf5fc9SBen Smithurst.Va KERNEL 1373faf5fc9SBen Smithurstvariable in 1383faf5fc9SBen Smithurst.Pa /etc/make.conf 1393faf5fc9SBen Smithurstcan be set to the name of the kernel to build; 1403faf5fc9SBen Smithurstin this case the 1413faf5fc9SBen Smithurst.Dq KERNEL=FOO 1423faf5fc9SBen Smithurstpart of the 1433faf5fc9SBen Smithurst.Dq buildkernel 1443faf5fc9SBen Smithurstand 1453faf5fc9SBen Smithurst.Dq installkernel 1463faf5fc9SBen Smithurstcommands can be omitted. 1473faf5fc9SBen Smithurst.Pp 1483faf5fc9SBen SmithurstAfter running these commands a system reboot is required, 1493faf5fc9SBen Smithurstotherwise many programs which have been rebuilt 1503faf5fc9SBen Smithurst(such as 1513faf5fc9SBen Smithurst.Nm ps , 1523faf5fc9SBen Smithurst.Nm top , 1533faf5fc9SBen Smithurstetc) 154a81996b6SBen Smithurstmay not work with the old kernel which is still running. 155786aa69aSBen Smithurst.Sh SEE ALSO 1567c20a493SBen Smithurst.Xr cc 1 , 157786aa69aSBen Smithurst.Xr install 1 , 158786aa69aSBen Smithurst.Xr make 1 , 159786aa69aSBen Smithurst.Xr make.conf 5 , 160a81996b6SBen Smithurst.Xr ports 7 , 16147f77d8cSBen Smithurst.Xr mergemaster 8 , 162a81996b6SBen Smithurst.Xr reboot 8 , 163a81996b6SBen Smithurst.Xr shutdown 8 164786aa69aSBen Smithurst.Sh AUTHORS 165786aa69aSBen Smithurst.An Mike W. Meyer Aq mwm@mired.org . 166