version 1.110, 2014/11/05 08:16:33 |
version 1.123, 2017/02/16 17:15:26 |
|
|
BUILDING(8) System Manager's Manual BUILDING(8) |
BUILDING(8) System Manager's Manual BUILDING(8) |
|
|
NAME |
NAME |
BUILDING -- Procedure for building NetBSD from source code. |
BUILDING - Procedure for building NetBSD from source code. |
|
|
REQUIREMENTS |
REQUIREMENTS |
NetBSD is designed to be buildable on most POSIX-compliant host systems. |
NetBSD is designed to be buildable on most POSIX-compliant host systems. |
|
|
any of these directories are missing, they will be skipped |
any of these directories are missing, they will be skipped |
during the build. |
during the build. |
|
|
x11/ ``Reachover'' build structure for X11R6; the source is in |
external/mit/xorg/ |
X11SRCDIR. |
``Reachover'' build structure for modular Xorg; the source |
|
is in X11SRCDIR. |
|
|
|
extsrc/ ``Reachover'' build structure for externally added |
|
programs and libraries; the source is in EXTSRCSRCDIR. |
|
|
Build tree layout |
Build tree layout |
The NetBSD build tree is described in hier(7), and the release layout is |
The NetBSD build tree is described in hier(7), and the release layout is |
|
|
Note: build.sh will provide a default of destdir.MACHINE (in |
Note: build.sh will provide a default of destdir.MACHINE (in |
the top-level .OBJDIR) unless run in `expert' mode. |
the top-level .OBJDIR) unless run in `expert' mode. |
|
|
|
EXTSRCSRCDIR |
|
Directory containing sources of externally added programs and |
|
libraries. If specified, must be an absolute path. |
|
|
|
Default: NETBSDRCDIR/../extsrc, if that exists; otherwise |
|
/usr/extsrc. |
|
|
MAKECONF The name of the make(1) configuration file. Only settable in |
MAKECONF The name of the make(1) configuration file. Only settable in |
the process environment. |
the process environment. |
|
|
|
|
|
|
Default: ``yes'' |
Default: ``yes'' |
|
|
|
MKEXTSRC Can be set to ``yes'' or ``no''. Indicates whether extsrc is |
|
built from EXTSRCSRCDIR. |
|
|
|
Default: ``no'' |
|
|
MKHTML Can be set to ``yes'' or ``no''. Indicates whether |
MKHTML Can be set to ``yes'' or ``no''. Indicates whether |
preformatted HTML manual pages will be built and installed |
preformatted HTML manual pages will be built and installed |
|
|
|
|
statically linked. |
statically linked. |
|
|
Default: Platform dependent. As of this writing, all |
Default: Platform dependent. As of this writing, all |
platforms except sh3 default to ``yes''. |
platforms except m68000 default to ``yes''. |
|
|
MKPICINSTALL |
MKPICINSTALL |
Can be set to ``yes'' or ``no''. Indicates whether the ar(1) |
Can be set to ``yes'' or ``no''. Indicates whether the ar(1) |
|
|
|
|
Default: ``no'' |
Default: ``no'' |
|
|
|
MKREPRO_TIMESTAMP |
|
Unix timestamp. When MKREPRO is set, the timestamp of all |
|
files in the sets will be set to this value. |
|
|
|
Default: Unset. |
|
|
MKSHARE Can be set to ``yes'' or ``no''. Indicates whether files |
MKSHARE Can be set to ``yes'' or ``no''. Indicates whether files |
destined to reside in DESTDIR/usr/share will be built and |
destined to reside in DESTDIR/usr/share will be built and |
installed during a build. If set to ``no'', then all of |
installed during a build. If set to ``no'', then all of |
|
|
USETOOLS is also set to ``no'' when using <bsd.*.mk> outside |
USETOOLS is also set to ``no'' when using <bsd.*.mk> outside |
the NetBSD source tree. |
the NetBSD source tree. |
|
|
X11SRCDIR Directory containing the X11R6 source. If specified, must be |
X11SRCDIR Directory containing the modular Xorg source. If specified, |
an absolute path. The main X11R6 source is found in |
must be an absolute path. The main modular Xorg source is |
X11SRCDIR/xfree/xc. |
found in X11SRCDIR/external/mit. |
|
|
Default: NETBSDRCDIR/../xsrc, if that exists; otherwise |
Default: NETBSDRCDIR/../xsrc, if that exists; otherwise |
/usr/xsrc. |
/usr/xsrc. |
|
|
X11FLAVOUR The style of X11 cross-built, set to either ``Xorg'' or |
|
``XFree86''. |
|
|
|
Default: ``Xorg'' on amd64, i386, macppc, shark and sparc64 |
|
platforms, ``XFree86'' on everything else. |
|
|
|
"make" variables for full builds |
"make" variables for full builds |
These variables only affect the top level ``Makefile'' and do not affect |
These variables only affect the top level ``Makefile'' and do not affect |
manually building subtrees of the NetBSD source code. |
manually building subtrees of the NetBSD source code. |
|
|
must have been performed with MKUNPRIVED=yes because ``make |
must have been performed with MKUNPRIVED=yes because ``make |
install-image'' relies on information in DESTDIR/METALOG. |
install-image'' relies on information in DESTDIR/METALOG. |
|
|
live-image Create NetBSD live images in the |
live-image Create NetBSD live images in the RELEASEDIR/images |
RELEASEDIR/RELEASEMACHINEDIR/installation/liveimage |
|
directory. The live image contains all necessary files to |
directory. The live image contains all necessary files to |
boot NetBSD up to multi-user mode, including all files |
boot NetBSD up to multi-user mode, including all files |
which should be extracted during installation, NetBSD |
which should be extracted during installation, NetBSD |
|
|
symbol table and can be used for debugging (for example |
symbol table and can be used for debugging (for example |
with a cross-gdb built by MKCROSSGDB). |
with a cross-gdb built by MKCROSSGDB). |
|
|
|
kernels This command will build all kernels defined in port |
|
specific release build procedure. |
|
|
|
This command internally calls the kernel=kconf operation |
|
for each found kernel configuration file. |
|
|
modules This command will build kernel modules and install them |
modules This command will build kernel modules and install them |
into DESTDIR. |
into DESTDIR. |
|
|
|
|
|
|
-x Set MKX11=yes. |
-x Set MKX11=yes. |
|
|
|
-Y extsrcdir |
|
Set the value of EXTSRCSRCDIR to extsrcdir. If a relative path |
|
is specified, it will be converted to an absolute path before |
|
being used. |
|
|
|
-y Set MKEXTSRC=yes. |
|
|
-Z var Unset ("zap") the environment variable var. This is propagated |
-Z var Unset ("zap") the environment variable var. This is propagated |
to the nbmake wrapper. |
to the nbmake wrapper. |
|
|
|
|
files in object directories. Instead, one may have to manually remove |
files in object directories. Instead, one may have to manually remove |
the files. Consult the UPDATING file for notices concerning this. |
the files. Consult the UPDATING file for notices concerning this. |
|
|
NetBSD August 7, 2014 NetBSD |
NetBSD February 16, 2017 NetBSD |