From b7d3d22051cf24be1fe930d29fc46dd3663c75e9 Mon Sep 17 00:00:00 2001 From: lukem Date: Sat, 10 May 2003 07:12:37 +0000 Subject: [PATCH] Add "sourcesets" argument/target, which builds source sets into RELEASEDIR/source/sets --- BUILDING | 5 +++++ Makefile | 14 ++++++++++---- build.sh | 12 +++++++----- doc/BUILDING.mdoc | 11 ++++++++++- 4 files changed, 32 insertions(+), 10 deletions(-) diff --git a/BUILDING b/BUILDING index ac2a4b1d33d7..c70dac041769 100644 --- a/BUILDING +++ b/BUILDING @@ -436,6 +436,9 @@ BUILDING distribution'' (as ``make build'' does not install all of the required files). + sourcesets Create source sets of the source tree into + RELEASEDIR/source/sets. + release Do a ``make distribution'', build kernels, distribution me- dia, and install sets (this as per ``make sets''), and then package the system into a standard release layout as de- @@ -498,6 +501,8 @@ BUILDING sets Perform ``make sets''. + sourcesets Perform ``make sourcesets''. + The following command line options alter the behaviour of the above oper- ations: The following command line options alter the behaviour of the build.sh operations described above: diff --git a/Makefile b/Makefile index e2ea79fc4be4..a0855bc31004 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.205 2003/04/18 19:14:39 thorpej Exp $ +# $NetBSD: Makefile,v 1.206 2003/05/10 07:12:37 lukem Exp $ # # This is the top-level makefile for building NetBSD. For an outline of @@ -52,6 +52,10 @@ # (See etc/Makefile for more information on this.) # regression-tests: # Runs the regression tests in "regress" on this host. +# sets: +# Populate ${RELEASEDIR}/${MACHINE}/binary/sets from ${DESTDIR} +# sourcesets: +# Populate ${RELEASEDIR}/source/sets from ${NETBSDSRCDIR} # # Targets invoked by `make build,' in order: # cleandir: cleans the tree. @@ -245,11 +249,13 @@ installworld: @printf "make ${.TARGET} finished at: " && date # -# Create sets from $DESTDIR into $RELEASEDIR +# Create sets from $DESTDIR or $NETBSDSRCDIR into $RELEASEDIR # -sets: - (cd ${.CURDIR}/distrib/sets && ${MAKE} maketars) +.for tgt in sets sourcesets +${tgt}: + (cd ${.CURDIR}/distrib/sets && ${MAKE} $@) +.endfor # # Build a release or snapshot (implies "make build"). Note that diff --git a/build.sh b/build.sh index 6dd521d8153b..9637771b70e5 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.99 2003/05/09 09:10:06 lukem Exp $ +# $NetBSD: build.sh,v 1.100 2003/05/10 07:12:37 lukem Exp $ # # Copyright (c) 2001-2003 The NetBSD Foundation, Inc. # All rights reserved. @@ -128,6 +128,7 @@ initdefaults() do_kernel=false do_install=false do_sets=false + do_sourcesets=false # Create scratch directory # @@ -322,7 +323,8 @@ Usage: ${progname} [-EnorUu] [-a arch] [-B buildid] [-D dest] [-j njob] [-M obj] kernel=conf Build kernel with config file \`conf' install=idir Run "make installworld" to \`idir' (useful after 'distribution' or 'release') - sets Create distribution sets in RELEASEDIR + sets Create binary sets in RELEASEDIR/MACHINE/binary/sets + sourcesets Create source sets in RELEASEDIR/source/sets Options: -a arch Set MACHINE_ARCH to arch (otherwise deduced from MACHINE) @@ -535,7 +537,7 @@ parseoptions() usage ;; - makewrapper|obj|tools|build|distribution|release|sets) + makewrapper|obj|tools|build|distribution|release|sets|sourcesets) ;; kernel=*) @@ -759,7 +761,7 @@ createmakewrapper() eval cat <