代码: 全选
$ cd /usr/src
$ build.sh -h
Usage: build.sh [-EnorUux] [-a arch] [-B buildid] [-D dest] [-j njob]
[-M obj] [-m mach] [-N noisy] [-O obj] [-R release] [-T tools]
[-V var=[value]] [-w wrapper] [-X x11src] [-Z var]
operation [...]
Build operations (all imply "obj" and "tools"):
build Run "make build".
distribution Run "make distribution" (includes DESTDIR/etc/ files).
release Run "make release" (includes kernels and distrib media).
Other operations:
help Show this message and exit.
makewrapper Create nbmake-${MACHINE} wrapper and nbmake.
Always performed.
obj Run "make obj". [Default unless -o is used]
tools Build and install tools.
install=idir Run "make installworld" to `idir' to install all sets
except `etc'. Useful after "distribution" or "release"
kernel=conf Build kernel with config file `conf'
releasekernel=conf Install kernel built by kernel=conf to RELEASEDIR.
sets Create binary sets in RELEASEDIR/MACHINE/binary/sets.
DESTDIR should be populated beforehand.
sourcesets Create source sets in RELEASEDIR/source/sets.
params Display various make(1) parameters.
Options:
-a arch Set MACHINE_ARCH to arch. [Default: deduced from MACHINE]
-B buildId Set BUILDID to buildId.
-D dest Set DESTDIR to dest. [Default: destdir.MACHINE]
-E Set "expert" mode; disables various safety checks.
Should not be used without expert knowledge of the build system.
-j njob Run up to njob jobs in parallel; see make(1) -j.
-M obj Set obj root directory to obj; sets MAKEOBJDIRPREFIX.
Unsets MAKEOBJDIR.
-m mach Set MACHINE to mach; not required if NetBSD native.
-N noisy Set the noisyness (MAKEVERBOSE) level of the build:
0 Quiet
1 Operations are described, commands are suppressed
2 Full output
[Default: 2]
-n Show commands that would be executed, but do not execute them.
-O obj Set obj root directory to obj; sets a MAKEOBJDIR pattern.
Unsets MAKEOBJDIRPREFIX.
-o Set MKOBJDIRS=no; do not create objdirs at start of build.
-R release Set RELEASEDIR to release. [Default: releasedir]
-r Remove contents of TOOLDIR and DESTDIR before building.
-T tools Set TOOLDIR to tools. If unset, and TOOLDIR is not set in
the environment, nbmake will be (re)built unconditionally.
-U Set MKUNPRIVED=yes; build without requiring root privileges,
install from an UNPRIVED build with proper file permissions.
-u Set MKUPDATE=yes; do not run "make clean" first.
Without this, everything is rebuilt, including the tools.
-V v=[val] Set variable `v' to `val'.
-w wrapper Create nbmake script as wrapper.
[Default: ${TOOLDIR}/bin/nbmake-${MACHINE}]
-X x11src Set X11SRCDIR to x11src. [Default: /usr/xsrc]
-x Set MKX11=yes; build X11R6 from X11SRCDIR
-Z v Unset ("zap") variable `v'.