From f1ead220212ccc45bc662b38c41f494fd3dafc25 Mon Sep 17 00:00:00 2001 From: apb Date: Sun, 27 Sep 2009 17:28:38 +0000 Subject: [PATCH] Allow build.sh "-C cdextra" option to be specified multiple times. --- BUILDING | 16 +++++++++------- build.sh | 10 +++++----- doc/BUILDING.mdoc | 20 +++++++++++++------- 3 files changed, 27 insertions(+), 19 deletions(-) diff --git a/BUILDING b/BUILDING index b72a97dae501..6bc1fbd07893 100644 --- a/BUILDING +++ b/BUILDING @@ -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 diff --git a/build.sh b/build.sh index 3ede98bc9146..405b1acdf165 100755 --- a/build.sh +++ b/build.sh @@ -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 <