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.\"
| 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: head/share/man/man7/build.7 142412 2005-02-25 00:40:46Z trhodes $
| 25.\" $FreeBSD: head/share/man/man7/build.7 148330 2005-07-23 14:23:30Z netchild $
|
26.\"
| 26.\"
|
27.Dd February 23, 2005
| 27.Dd July 23, 2005
|
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 source for the 35.Fx 36system and applications are contained in three different directories, 37normally 38.Pa /usr/src , 39.Pa /usr/doc , 40and 41.Pa /usr/ports . 42.Pa /usr/src 43contains the 44.Dq "base system" 45sources, which is loosely defined as the things required to rebuild 46the system to a useful state. 47.Pa /usr/doc 48contains the source for the system documentation, excluding the manual 49pages. 50.Pa /usr/ports 51is a tree that provides a consistent interface for building and 52installing third party applications. 53.Pp 54The 55.Xr make 1 56command is used in each of these directories to build and install the 57things in that directory. 58Issuing the 59.Xr make 1 60command in any directory or 61subdirectory of those directories has the same effect as issuing the 62same command in all subdirectories of that directory. 63With no target specified, the things in that directory are just built. 64The following 65list provides the names and actions for other targets: 66.Bl -tag -width indent-two 67.It Cm clean 68Removes any files created during the build process. 69.It Cm install 70Installs the results of the build for this directory. 71.It Cm update 72Gets updated sources as configured in 73.Pa /etc/make.conf . 74.El 75.Pp 76The other 77.Pa /usr/src 78make targets are: 79.Bl -tag -width indent-two 80.It Cm buildworld 81Rebuild everything but the kernel, configure files in 82.Pa /etc , 83and release. 84.It Cm installworld 85Install everything built by 86.Cm buildworld . 87.It Cm buildkernel 88Rebuild the kernel and the kernel modules. 89.It Cm installkernel 90Install the kernel and the kernel modules. 91.It Cm reinstallkernel . 92Reinstall the kernel and the kernel modules. 93.It Cm kernel 94Equivalent to 95.Cm buildkernel 96followed by 97.Cm installkernel
| 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 source for the 35.Fx 36system and applications are contained in three different directories, 37normally 38.Pa /usr/src , 39.Pa /usr/doc , 40and 41.Pa /usr/ports . 42.Pa /usr/src 43contains the 44.Dq "base system" 45sources, which is loosely defined as the things required to rebuild 46the system to a useful state. 47.Pa /usr/doc 48contains the source for the system documentation, excluding the manual 49pages. 50.Pa /usr/ports 51is a tree that provides a consistent interface for building and 52installing third party applications. 53.Pp 54The 55.Xr make 1 56command is used in each of these directories to build and install the 57things in that directory. 58Issuing the 59.Xr make 1 60command in any directory or 61subdirectory of those directories has the same effect as issuing the 62same command in all subdirectories of that directory. 63With no target specified, the things in that directory are just built. 64The following 65list provides the names and actions for other targets: 66.Bl -tag -width indent-two 67.It Cm clean 68Removes any files created during the build process. 69.It Cm install 70Installs the results of the build for this directory. 71.It Cm update 72Gets updated sources as configured in 73.Pa /etc/make.conf . 74.El 75.Pp 76The other 77.Pa /usr/src 78make targets are: 79.Bl -tag -width indent-two 80.It Cm buildworld 81Rebuild everything but the kernel, configure files in 82.Pa /etc , 83and release. 84.It Cm installworld 85Install everything built by 86.Cm buildworld . 87.It Cm buildkernel 88Rebuild the kernel and the kernel modules. 89.It Cm installkernel 90Install the kernel and the kernel modules. 91.It Cm reinstallkernel . 92Reinstall the kernel and the kernel modules. 93.It Cm kernel 94Equivalent to 95.Cm buildkernel 96followed by 97.Cm installkernel
|
| 98.It Cm delete-old 99Delete obsolete base system files and directories interactively. 100When -DBATCH_DELETE_OLD_FILES is specified at the command line, 101the delete operation will be non-interactively. 102.It Cm delete-old-libs 103Delete obsolete base system libraries interactively. 104This should only be used if no 3rd party software uses the libraries anymore. 105When -DBATCH_DELETE_OLD_FILES is specified at the command line, 106the delete operation will be non-interactively.
|
98.El 99.Pp 100For more information about the ports build process, see 101.Xr ports 7 . 102.Sh ENVIRONMENT 103.Bl -tag -width ".Va TARGET_ARCH" 104.It Va TARGET_ARCH 105The target machine processor architecture. 106This is analogous to the 107.Dq Nm uname Fl p 108output. 109Set this to cross-build for a different architecture. 110.It Va TARGET 111The target hardware platform. 112This is analogous to the 113.Dq Nm uname Fl m 114output. 115This is necessary to cross-build some target architectures. 116For example, cross-building for PC98 machines requires 117.Va TARGET_ARCH Ns = Ns Li i386 118and 119.Va TARGET Ns = Ns Li pc98 . 120.It Va NO_WERROR 121If defined, warnings will not cause the build to halt, even if the 122makefile says otherwise. 123.It Va DESTDIR 124The directory hierarchy where the resulting binaries will be 125installed. 126.El 127.Sh FILES 128.Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact 129.It Pa /etc/make.conf 130.It Pa /usr/doc/Makefile 131.It Pa /usr/doc/share/mk/doc.project.mk 132.It Pa /usr/ports/Mk/bsd.port.mk 133.It Pa /usr/ports/Mk/bsd.sites.mk 134.It Pa /usr/share/examples/etc/make.conf 135.It Pa /usr/src/Makefile 136.It Pa /usr/src/Makefile.inc1 137.El 138.Sh EXAMPLES 139For an 140.Dq approved 141method of updating your system from the latest sources, 142please see the 143.Sx COMMON ITEMS 144section in 145.Pa src/UPDATING . 146.Pp 147The following sequence of commands can be used to cross-build the 148system for the Alpha architecture on an i386 host: 149.Bd -literal -offset indent 150cd /usr/src 151make TARGET_ARCH=alpha buildworld 152make TARGET_ARCH=alpha DESTDIR=/clients/axp installworld 153.Ed 154.Sh SEE ALSO 155.Xr cc 1 , 156.Xr install 1 , 157.Xr make 1 , 158.Xr make.conf 5 , 159.Xr ports 7 , 160.Xr release 7 , 161.Xr config 8 , 162.Xr mergemaster 8 , 163.Xr reboot 8 , 164.Xr shutdown 8 165.Sh AUTHORS 166.An Mike W. Meyer Aq mwm@mired.org .
| 107.El 108.Pp 109For more information about the ports build process, see 110.Xr ports 7 . 111.Sh ENVIRONMENT 112.Bl -tag -width ".Va TARGET_ARCH" 113.It Va TARGET_ARCH 114The target machine processor architecture. 115This is analogous to the 116.Dq Nm uname Fl p 117output. 118Set this to cross-build for a different architecture. 119.It Va TARGET 120The target hardware platform. 121This is analogous to the 122.Dq Nm uname Fl m 123output. 124This is necessary to cross-build some target architectures. 125For example, cross-building for PC98 machines requires 126.Va TARGET_ARCH Ns = Ns Li i386 127and 128.Va TARGET Ns = Ns Li pc98 . 129.It Va NO_WERROR 130If defined, warnings will not cause the build to halt, even if the 131makefile says otherwise. 132.It Va DESTDIR 133The directory hierarchy where the resulting binaries will be 134installed. 135.El 136.Sh FILES 137.Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact 138.It Pa /etc/make.conf 139.It Pa /usr/doc/Makefile 140.It Pa /usr/doc/share/mk/doc.project.mk 141.It Pa /usr/ports/Mk/bsd.port.mk 142.It Pa /usr/ports/Mk/bsd.sites.mk 143.It Pa /usr/share/examples/etc/make.conf 144.It Pa /usr/src/Makefile 145.It Pa /usr/src/Makefile.inc1 146.El 147.Sh EXAMPLES 148For an 149.Dq approved 150method of updating your system from the latest sources, 151please see the 152.Sx COMMON ITEMS 153section in 154.Pa src/UPDATING . 155.Pp 156The following sequence of commands can be used to cross-build the 157system for the Alpha architecture on an i386 host: 158.Bd -literal -offset indent 159cd /usr/src 160make TARGET_ARCH=alpha buildworld 161make TARGET_ARCH=alpha DESTDIR=/clients/axp installworld 162.Ed 163.Sh SEE ALSO 164.Xr cc 1 , 165.Xr install 1 , 166.Xr make 1 , 167.Xr make.conf 5 , 168.Xr ports 7 , 169.Xr release 7 , 170.Xr config 8 , 171.Xr mergemaster 8 , 172.Xr reboot 8 , 173.Xr shutdown 8 174.Sh AUTHORS 175.An Mike W. Meyer Aq mwm@mired.org .
|