Allow build.sh "-C cdextra" option to be specified multiple times.

This commit is contained in:
apb 2009-09-27 17:28:38 +00:00
parent cd4cace7bb
commit f1ead22021
3 changed files with 27 additions and 19 deletions

View File

@ -721,13 +721,15 @@ BUILDING
``nbmake-MACHINE-BUILDID''.
-C cdextras
Set the value of CDEXTRA to cdextras which is a space-separated
list of files or directories which will be added in order to
the CD-ROM image when used in conjunction with ``iso-image'' or
``iso-image-source''. Files will be added to the root of the
CD-ROM image, whereas directories will be copied recursively.
If relative paths are specified, they will be converted to
absolute paths before being used.
Append cdextras to the CDEXTRA variable, which is a space-sepa-
rated list of files or directories that will be added to the
CD-ROM image that may be create by the ``iso-image'' or
``iso-image-source'' operations. Files will be added to the
root of the CD-ROM image, whereas directories will be copied
recursively. If relative paths are specified, they will be
converted to absolute paths before being used. Multiple paths
may be specified via multiple -C options, or via a single
option whose argument contains multiple space-separated paths.
-D dest Set the value of DESTDIR to dest. If a relative path is speci-
fied, it will be converted to an absolute path before being

View File

@ -1,5 +1,5 @@
#! /usr/bin/env sh
# $NetBSD: build.sh,v 1.208 2009/09/27 17:25:01 apb Exp $
# $NetBSD: build.sh,v 1.209 2009/09/27 17:28:38 apb Exp $
#
# Copyright (c) 2001-2009 The NetBSD Foundation, Inc.
# All rights reserved.
@ -580,7 +580,7 @@ Usage: ${progname} [-EnorUux] [-a arch] [-B buildid] [-C cdextras]
Options:
-a arch Set MACHINE_ARCH to arch. [Default: deduced from MACHINE]
-B buildId Set BUILDID to buildId.
-C cdextras Set CDEXTRA to cdextras
-C cdextras Append cdextras to CDEXTRA variable for inclusion on CD-ROM.
-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.
@ -664,7 +664,7 @@ parseoptions()
-C)
eval ${optargcmd}; resolvepaths OPTARG
iso_dir=${OPTARG}
CDEXTRA="${CDEXTRA}${CDEXTRA:+ }${OPTARG}"
;;
-D)
@ -1223,7 +1223,7 @@ createmakewrapper()
eval cat <<EOF ${makewrapout}
#! ${HOST_SH}
# Set proper variables to allow easy "make" building of a NetBSD subtree.
# Generated from: \$NetBSD: build.sh,v 1.208 2009/09/27 17:25:01 apb Exp $
# Generated from: \$NetBSD: build.sh,v 1.209 2009/09/27 17:28:38 apb Exp $
# with these arguments: ${_args}
#
@ -1445,7 +1445,7 @@ main()
iso-image|iso-image-source)
${runcmd} "${makewrapper}" ${parallel} \
CDEXTRA="$iso_dir" ${op} ||
CDEXTRA="$CDEXTRA" ${op} ||
bomb "Failed to make ${op}"
statusmsg "Successful make ${op}"
;;

View File

@ -1,4 +1,4 @@
.\" $NetBSD: BUILDING.mdoc,v 1.75 2009/09/27 16:44:40 apb Exp $
.\" $NetBSD: BUILDING.mdoc,v 1.76 2009/09/27 17:28:38 apb Exp $
.\"
.\" Copyright (c) 2001-2008 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -1358,19 +1358,25 @@ wrapper script so that the resulting name is of the form
.Dq Sy \*[toolprefix]make-MACHINE-BUILDID .
.
.It Fl C Ar cdextras
Set the value of
.Sy CDEXTRA
to
Append
.Ar cdextras
which is a space-separated list of files or directories which will be
added in order to the CD-ROM image when used in conjunction with
to the
.Sy CDEXTRA
variable,
which is a space-separated list of files or directories that will be
added to the CD-ROM image that may be create by the
.Dq iso-image
or
.Dq iso-image-source .
.Dq iso-image-source
operations.
Files will be added to the root of the CD-ROM image, whereas directories
will be copied recursively.
If relative paths are specified, they will be converted to
absolute paths before being used.
Multiple paths may be specified via multiple
.Fl C
options, or via a single option whose argument contains multiple
space-separated paths.
.
.It Fl D Ar dest
Set the value of