*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> build (7)              



NAME    [Toc]    [Back]

     build -- information on how to build the system

DESCRIPTION    [Toc]    [Back]

     The source for the FreeBSD system and applications are contained in three
     different directories, normally /usr/src, /usr/doc, and /usr/ports.
     /usr/src contains the ``base system'' sources, which is loosely defined
     as the things required to rebuild the system to a useful state.  /usr/doc
     contains the source for the system documentation, excluding the manual
     pages.  /usr/ports is a tree that provides a consistent interface for
     building and installing third party applications.

     The make(1) command is used in each of these directories to build and
     install the things in that directory.  Issuing the make(1) command in any
     directory or subdirectory of those directories has the same effect as
     issuing the same command in all subdirectories of that directory.	With
     no target specified, the things in that directory are just built.	The
     following list provides the names and actions for other targets:

     clean	 Removes any files created during the build process.

     install	 Installs the results of the build for this directory.

     update	 Gets updated sources as configured in /etc/make.conf.

     The other /usr/src make targets are:

     buildworld  Rebuild everything but the kernel, configure files in /etc,
		 and release.

		 Install everything built by buildworld.

     world	 buildworld + installworld.

		 Rebuild the kernel and the kernel modules.

		 Install the kernel and the kernel modules.

		 Reinstall the kernel and the kernel modules.

     For more information about the ports build process, see ports(7).

ENVIRONMENT    [Toc]    [Back]

     TARGET_ARCH  The target machine processor architecture.  This is analogous
 to the ``uname -p'' output.  Set this to cross-build
		  for a different architecture.

     TARGET	  The target hardware platform.  This is analogous to the
		  ``uname -m'' output.	This is necessary to cross-build some
		  target architectures.  For example, cross-building for PC98
		  machines requires TARGET_ARCH=i386 and TARGET=pc98.

     NO_WERROR	  If defined, warnings will not cause the build to halt, even
		  if the makefile says otherwise.

     DESTDIR	  The directory hierarchy where the resulting binaries will be

FILES    [Toc]    [Back]


EXAMPLES    [Toc]    [Back]

     The ``approved'' method of updating your system from the latest sources

	   make buildworld
	   make buildkernel KERNCONF=FOO
	   make installkernel KERNCONF=FOO
	   <Reboot the new kernel in single user mode>
	   make installworld

     ``FOO'' must be replaced with the name of the kernel configuration file
     from which the kernel should be built.  Alternatively, the KERNCONF variable
 in /etc/make.conf can be set to the name of the kernel to build; in
     this case the KERNCONF=FOO part of the buildkernel and installkernel commands
 can be omitted.

     After running these commands a system reboot is required, otherwise many
     programs which have been rebuilt (such as ps(1), top(1), etc.) may not
     work with the old kernel which is still running.  While not strictly necessary
 much of the time for upgrades from very recent sources, the reboot
     into single user mode is critically important for upgrading from older
     kernels, or when you know ``weird things'' have happened with the kernel.

     The following sequence of commands can be used to cross-build the system
     for the Alpha architecture on an i386 host:

	   cd /usr/src
	   make TARGET_ARCH=alpha buildworld
	   make TARGET_ARCH=alpha DESTDIR=/clients/axp installworld

SEE ALSO    [Toc]    [Back]

     cc(1), install(1), make(1), make.conf(5), ports(7), release(7),
     mergemaster(8), reboot(8), shutdown(8)

AUTHORS    [Toc]    [Back]

     Mike W. Meyer <mwm@mired.org>.

FreeBSD 5.2.1			March 15, 2002			 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
make.conf FreeBSD system build information
ypinit HP-UX build and install Network Information Service databases
mkfs Linux build a Linux file system
config FreeBSD build system configuration files
sizer Tru64 Displays information about the system or kernel, or creates a system configuration file
dxsysinfo Tru64 Monitors system information such as CPU activity, memory, swap space, and file system usage
uname HP-UX display information about computer system; set node name (system name)
uname HP-UX get information about computer system; set node name (system name)
setuname HP-UX get information about computer system; set node name (system name)
sysctl NetBSD get or set system information
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service