opensolaris.sh revision 1341:6d7c4f090a72
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
22# Use is subject to license terms.
23#
24#ident	"%Z%%M%	%I%	%E% SMI"
25#
26#
27#	Configuration variables for the runtime environment of the nightly
28# build script and other tools for construction and packaging of releases.
29# This script is sourced by 'nightly' and 'bldenv' to set up the environment
30# for the build. This example is suitable for building an OpenSolaris
31# workspace, which will contain the resulting archives. It is based
32# off the onnv release. It sets NIGHTLY_OPTIONS to make nightly do:
33#	DEBUG build only (-D, -F)
34#	do not run protocmp or checkpaths (-N)
35#	do not bringover from the parent (-n)
36#	creates cpio archives for bfu (-a)
37#	sends mail on completion (-m and the MAILTO variable)
38#	checks for changes in ELF runpaths (-r)
39#	build and use this workspace's tools in $SRC/tools (-t)
40#	use dmake instead of pmake (-d)
41#
42NIGHTLY_OPTIONS="-FNnadDmrt";		export NIGHTLY_OPTIONS
43
44# This is a variable for the rest of the script - GATE doesn't matter to
45# nightly itself
46GATE=testws;			export GATE
47
48# CODEMGR_WS - where is your workspace at (or what should nightly name it)
49CODEMGR_WS="/export/$GATE";			export CODEMGR_WS
50
51# Location of encumbered binaries.
52ON_CLOSED_BINS="$CODEMGR_WS/closed";		export ON_CLOSED_BINS
53
54# This flag controls whether to build the closed source.  If
55# undefined, nightly(1) and bldenv(1) will set it according to whether
56# the closed tree is present.
57# CLOSED_IS_PRESENT="no";		export CLOSED_IS_PRESENT
58
59# Maximum number of dmake jobs.  The recommended number is 2 + (2 *
60# NCPUS), where NCPUS is the number of CPUs on your build system.
61maxjobs() {
62	ncpu=`/usr/sbin/psrinfo -p`
63	expr $ncpu \* 2 + 2
64}
65DMAKE_MAX_JOBS=`maxjobs`;			export DMAKE_MAX_JOBS
66
67# path to onbld tool binaries
68ONBLD_BIN="/opt/onbld/bin"
69
70# used by bfu.
71FASTFS=$ONBLD_BIN/`uname -p`/fastfs;		export FASTFS
72BFULD=$ONBLD_BIN/`uname -p`/bfuld;		export BFULD
73GZIPBIN=/usr/bin/gzip;				export GZIPBIN
74ACR=$ONBLD_BIN/acr;				export ACR
75
76# PARENT_WS is used to determine the parent of this workspace. This is
77# for the options that deal with the parent workspace (such as where the
78# proto area will go).
79PARENT_WS="";			export PARENT_WS
80
81# CLONE_WS is the workspace nightly should do a bringover from. Since it's
82# going to bringover usr/src, this could take a while, so we use the
83# clone instead of the gate (see the gate's README).
84CLONE_WS="";			export CLONE_WS
85
86# The bringover, if any, is done as STAFFER.
87# Set STAFFER to your own login as gatekeeper or developer
88# The point is to use group "staff" and avoid referencing the parent
89# workspace as root.
90# Some scripts optionally send mail messages to MAILTO.
91#
92STAFFER=nobody;				export STAFFER
93MAILTO=$STAFFER;			export MAILTO
94
95# The project (see project(4)) under which to run this build.  If not
96# specified, the build is simply run in a new task in the current project.
97BUILD_PROJECT=;				export BUILD_PROJECT
98
99# You should not need to change the next four lines
100LOCKNAME="`basename $CODEMGR_WS`_nightly.lock"; export LOCKNAME
101ATLOG="$CODEMGR_WS/log";			export ATLOG
102LOGFILE="$ATLOG/nightly.log";			export LOGFILE
103MACH=`uname -p`;				export MACH
104
105# REF_PROTO_LIST - for comparing the list of stuff in your proto area
106# with. Generally this should be left alone, since you want to see differences
107# from your parent (the gate).
108#
109REF_PROTO_LIST=$PARENT_WS/usr/src/proto_list_${MACH}; export REF_PROTO_LIST
110
111# where cpio archives of the OS are placed. Usually this should be left
112# alone too.
113CPIODIR="${CODEMGR_WS}/archives/${MACH}/nightly";	export CPIODIR
114
115#
116#	build environment variables, including version info for mcs, motd,
117# motd, uname and boot messages. Mostly you shouldn't change this except
118# when the release slips (nah) or you move an environment file to a new
119# release
120#
121ROOT="$CODEMGR_WS/proto/root_${MACH}";	export ROOT
122SRC="$CODEMGR_WS/usr/src";         	export SRC
123VERSION="$GATE";			export VERSION
124
125# the source product has no SCCS history, and is modified to remove source
126# that cannot be shipped. EXPORT_SRC is where the clear files are copied, then
127# modified with 'make EXPORT_SRC'.
128EXPORT_SRC="$CODEMGR_WS/export_src";    export EXPORT_SRC
129
130# CRYPT_SRC is similar to EXPORT_SRC, but after 'make CRYPT_SRC' the files in
131# xmod/cry_files are saved. They are dropped on the exportable source to create
132# the domestic build.
133CRYPT_SRC="$CODEMGR_WS/crypt_src";      export CRYPT_SRC
134
135#
136# the RELEASE and RELEASE_DATE variables are set in Makefile.master;
137# there might be special reasons to override them here, but that
138# should not be the case in general
139#
140# RELEASE="5.11";			export RELEASE
141# RELEASE_DATE="October 2007";		export RELEASE_DATE
142
143# proto area in parent for optionally depositing a copy of headers and
144# libraries corresponding to the protolibs target
145# not applicable given the NIGHTLY_OPTIONS
146#
147PARENT_ROOT=$PARENT_WS/proto/root_$MACH; export PARENT_ROOT
148
149#
150#       package creation variable. you probably shouldn't change this either.
151#
152PKGARCHIVE="${CODEMGR_WS}/packages/${MACH}/nightly";	export PKGARCHIVE
153
154# we want make to do as much as it can, just in case there's more than
155# one problem.
156MAKEFLAGS=k;	export MAKEFLAGS
157
158# Magic variable to prevent the devpro compilers/teamware from sending
159# mail back to devpro on every use.
160UT_NO_USAGE_TRACKING="1"; export UT_NO_USAGE_TRACKING
161
162# Build tools - don't change these unless you know what you're doing.  These
163# variables allows you to get the compilers and onbld files locally or
164# through cachefs.  Set BUILD_TOOLS to pull everything from one location.
165# Alternately, you can set ONBLD_TOOLS to where you keep the contents of
166# SUNWonbld and SPRO_ROOT to where you keep the compilers.  SPRO_VROOT
167# exists to make it easier to test new versions of the compiler.
168BUILD_TOOLS=/opt;				export BUILD_TOOLS
169#ONBLD_TOOLS=/opt/onbld;			export ONBLD_TOOLS
170SPRO_ROOT=/opt/SUNWspro;			export SPRO_ROOT
171SPRO_VROOT=$SPRO_ROOT;				export SPRO_VROOT
172
173# This goes along with lint - it is a series of the form "A [y|n]" which
174# means "go to directory A and run 'make lint'" Then mail me (y) the
175# difference in the lint output. 'y' should only be used if the area you're
176# linting is actually lint clean or you'll get lots of mail.
177# You shouldn't need to change this though.
178#LINTDIRS="$SRC y";	export LINTDIRS
179
180# Set this flag to 'n' to disable the automatic validation of the dmake
181# version in use.  The default is to check it.
182#CHECK_DMAKE=y
183
184# Set this flag to 'n' to disable the use of 'checkpaths'.  The default,
185# if the 'N' option is not specified, is to run this test.
186#CHECK_PATHS=y
187
188# BRINGOVER_FILES is the list of files nightly passes to bringover.
189# If not set the default is "usr", but it can be used for bringing
190# over deleted_files or other nifty directories.
191#BRINGOVER_FILES="usr deleted_files"
192