Add an iso-dir=directory option. When combined with iso-image or

iso-image-source, it will cause directory to be added to the CD-ROM image.
This commit is contained in:
jnemeth 2007-09-01 08:15:27 +00:00
parent c53c02b0c9
commit 3afb399fc8
3 changed files with 55 additions and 6 deletions

View File

@ -624,6 +624,15 @@ BUILDING
iso-image Perform ``make iso-image''.
iso-image-source
Perform ``make iso-image-source''.
iso-dir=directory
When combined with ``iso-image'' or ``iso-image-source'',
it will cause directory to be added to the CD-ROM image.
If directory does not start with ``/'' then it will be made
relative to RELEASEDIR.
The following command line options alter the behaviour of the build.sh
operations described above:
@ -799,4 +808,4 @@ HISTORY
BUGS
A few platforms are not yet using this build system.
NetBSD August 30, 2007 NetBSD
NetBSD September 1, 2007 NetBSD

View File

@ -1,5 +1,5 @@
#! /usr/bin/env sh
# $NetBSD: build.sh,v 1.172 2007/08/30 05:30:02 jnemeth Exp $
# $NetBSD: build.sh,v 1.173 2007/09/01 08:15:27 jnemeth Exp $
#
# Copyright (c) 2001-2005 The NetBSD Foundation, Inc.
# All rights reserved.
@ -231,6 +231,7 @@ initdefaults()
do_syspkgs=false
do_iso_image=false
do_iso_image_source=false
do_iso_dir=false
do_params=false
# Create scratch directory
@ -525,6 +526,7 @@ Usage: ${progname} [-EnorUux] [-a arch] [-B buildid] [-D dest] [-j njob]
syspkgs Create syspkgs in RELEASEDIR/MACHINE/binary/syspkgs.
iso-image Create CD-ROM image in RELEASEDIR/iso.
iso-image-source Create CD-ROM image with source in RELEASEDIR/iso.
iso-dir=cddir Add the contents of \`cddir' to an CD-ROM image.
params Display various make(1) parameters.
Options:
@ -775,6 +777,15 @@ parseoptions()
op=iso_image_source # used as part of a variable name
;;
iso-dir=*)
arg=${op#*=}
op=iso_dir # used as part of a variable name
[ -n "${arg}" ] ||
bomb "Must supply a directory with \`${op}=...'"
OPTARG=$arg; resolvepath
iso_dir=$OPTARG
;;
kernel=*|releasekernel=*)
arg=${op#*=}
op=${op%%=*}
@ -1089,7 +1100,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.172 2007/08/30 05:30:02 jnemeth Exp $
# Generated from: \$NetBSD: build.sh,v 1.173 2007/09/01 08:15:27 jnemeth Exp $
# with these arguments: ${_args}
#
EOF
@ -1272,12 +1283,23 @@ main()
statusmsg "Successful make ${op}"
;;
obj|build|distribution|iso-image|iso-image-source|release|sourcesets|syspkgs|params)
obj|build|distribution|release|sourcesets|syspkgs|params)
${runcmd} "${makewrapper}" ${parallel} ${op} ||
bomb "Failed to make ${op}"
statusmsg "Successful make ${op}"
;;
iso-image|iso-image-source)
${runcmd} "${makewrapper}" ${parallel} \
CDEXTRA=$iso_dir ${op} ||
bomb "Failed to make ${op}"
statusmsg "Successful make ${op}"
;;
iso-dir=*)
# no-op
;;
kernel=*)
arg=${op#*=}
buildkernel "${arg}"

View File

@ -1,4 +1,4 @@
.\" $NetBSD: BUILDING.mdoc,v 1.51 2007/08/30 10:29:02 jnemeth Exp $
.\" $NetBSD: BUILDING.mdoc,v 1.52 2007/09/01 08:15:27 jnemeth Exp $
.\"
.\" Copyright (c) 2001-2007 The NetBSD Foundation, Inc.
.\" All rights reserved.
@ -40,7 +40,7 @@
.\" Toolchain prefix for commands
.ds toolprefix nb
.
.Dd August 30, 2007
.Dd September 1, 2007
.Dt BUILDING 8
.Os NetBSD
.
@ -1174,6 +1174,24 @@ Perform
Perform
.Dq make iso-image .
.
.It Sy iso-image-source
Perform
.Dq make iso-image-source .
.
.It Sy iso-dir Ns = Ns Ar directory
When combined with
.Dq iso-image
or
.Dq iso-image-source ,
it will cause
.Ar directory
to be added to the CD-ROM image.
If
.Ar directory
does not start with
.Dq /
then it will be made relative to RELEASEDIR.
.
.El
.
.Pp