version 1.294, 2014/08/10 05:56:36 |
version 1.294.2.3, 2014/11/14 14:58:27 |
Line 1034 Usage: ${progname} [-EhnorUuxy] [-a arch |
|
Line 1034 Usage: ${progname} [-EhnorUuxy] [-a arch |
|
sourcesets Create source sets in RELEASEDIR/source/sets. |
sourcesets Create source sets in RELEASEDIR/source/sets. |
syspkgs Create syspkgs in |
syspkgs Create syspkgs in |
RELEASEDIR/RELEASEMACHINEDIR/binary/syspkgs. |
RELEASEDIR/RELEASEMACHINEDIR/binary/syspkgs. |
iso-image Create CD-ROM image in RELEASEDIR/iso. |
iso-image Create CD-ROM image in RELEASEDIR/images. |
iso-image-source Create CD-ROM image with source in RELEASEDIR/iso. |
iso-image-source Create CD-ROM image with source in RELEASEDIR/images. |
live-image Create bootable live image in |
live-image Create bootable live image in |
RELEASEDIR/RELEASEMACHINEDIR/installation/liveimage. |
RELEASEDIR/RELEASEMACHINEDIR/installation/liveimage. |
install-image Create bootable installation image in |
install-image Create bootable installation image in |
|
|
{ |
{ |
opts='a:B:C:D:Ehj:M:m:N:nO:oR:rS:T:UuV:w:X:xY:yZ:' |
opts='a:B:C:D:Ehj:M:m:N:nO:oR:rS:T:UuV:w:X:xY:yZ:' |
opt_a=false |
opt_a=false |
|
opt_m=false |
|
|
if type getopts >/dev/null 2>&1; then |
if type getopts >/dev/null 2>&1; then |
# Use POSIX getopts. |
# Use POSIX getopts. |
|
|
-m) |
-m) |
eval ${optargcmd} |
eval ${optargcmd} |
MACHINE="${OPTARG}" |
MACHINE="${OPTARG}" |
|
opt_m=true |
;; |
;; |
|
|
-N) |
-N) |
|
|
exit $? |
exit $? |
;; |
;; |
|
|
makewrapper|cleandir|obj|tools|build|distribution|release|sets|sourcesets|syspkgs|params) |
|
;; |
|
|
|
iso-image) |
|
op=iso_image # used as part of a variable name |
|
;; |
|
|
|
iso-image-source) |
|
op=iso_image_source # used as part of a variable name |
|
;; |
|
|
|
live-image) |
|
op=live_image # used as part of a variable name |
|
;; |
|
|
|
install-image) |
|
op=install_image # used as part of a variable name |
|
;; |
|
|
|
kernel=*|releasekernel=*|kernel.gdb=*) |
kernel=*|releasekernel=*|kernel.gdb=*) |
arg=${op#*=} |
arg=${op#*=} |
op=${op%%=*} |
op=${op%%=*} |
|
|
|
|
;; |
;; |
|
|
modules) |
|
op=modules |
|
;; |
|
|
|
install=*|installmodules=*) |
install=*|installmodules=*) |
arg=${op#*=} |
arg=${op#*=} |
op=${op%%=*} |
op=${op%%=*} |
|
|
bomb "Must supply a directory with \`install=...'" |
bomb "Must supply a directory with \`install=...'" |
;; |
;; |
|
|
rump|rumptest) |
build|\ |
op=${op} |
cleandir|\ |
|
distribution|\ |
|
install-image|\ |
|
iso-image-source|\ |
|
iso-image|\ |
|
live-image|\ |
|
makewrapper|\ |
|
modules|\ |
|
obj|\ |
|
params|\ |
|
release|\ |
|
rump|\ |
|
rumptest|\ |
|
sets|\ |
|
sourcesets|\ |
|
syspkgs|\ |
|
tools) |
;; |
;; |
|
|
*) |
*) |
|
|
;; |
;; |
|
|
esac |
esac |
|
# ${op} may contain chars that are not allowed in variable |
|
# names. Replace them with '_' before setting do_${op}. |
|
op="$( echo "$op" | tr -s '.-' '__')" |
eval do_${op}=true |
eval do_${op}=true |
done |
done |
[ -n "${operations}" ] || usage "Missing operation to perform." |
[ -n "${operations}" ] || usage "Missing operation to perform." |
|
|
# Set up MACHINE*. On a NetBSD host, these are allowed to be unset. |
# Set up MACHINE*. On a NetBSD host, these are allowed to be unset. |
# |
# |
# MACHINE_ARCH from the environment may be overridden by getarch |
|
# (based on the MACHINE), but MACHINE_ARCH from the -a option should |
|
# not be overridden. |
|
# |
|
if [ -z "${MACHINE}" ]; then |
if [ -z "${MACHINE}" ]; then |
[ "${uname_s}" = "NetBSD" ] || |
[ "${uname_s}" = "NetBSD" ] || |
bomb "MACHINE must be set, or -m must be used, for cross builds." |
bomb "MACHINE must be set, or -m must be used, for cross builds." |
MACHINE=${uname_m} |
MACHINE=${uname_m} |
fi |
fi |
$opt_a || getarch |
if $opt_m && ! $opt_a; then |
|
# Settings implied by the command line -m option |
|
# override MACHINE_ARCH from the environment (if any). |
|
getarch |
|
fi |
|
[ -n "${MACHINE_ARCH}" ] || getarch |
validatearch |
validatearch |
|
|
# Set up default make(1) environment. |
# Set up default make(1) environment. |