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 (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
22#
23
24#	Configuration variables for the runtime environment of the nightly
25# build script and other tools for construction and packaging of releases.
26# This script is sourced by 'nightly' and 'bldenv' to set up the environment
27# for the build. This example is suitable for building an OpenSolaris
28# workspace, which will contain the resulting archives. It is based
29# off the onnv release. It sets NIGHTLY_OPTIONS to make nightly do:
30#	DEBUG build only (-D, -F)
31#	do not bringover from the parent (-n)
32#	runs 'make check' (-C)
33#	runs lint in usr/src (-l plus the LINTDIRS variable)
34#	sends mail on completion (-m and the MAILTO variable)
35#	creates packages for PIT/RE (-p)
36#	checks for changes in ELF runpaths (-r)
37#	build and use this workspace's tools in $SRC/tools (-t)
38#
39NIGHTLY_OPTIONS="-FnCDlmprt";		export NIGHTLY_OPTIONS
40
41# This is a variable for the rest of the script - GATE doesn't matter to
42# nightly itself
43GATE=testws;			export GATE
44
45# CODEMGR_WS - where is your workspace at (or what should nightly name it)
46CODEMGR_WS="/export/$GATE";			export CODEMGR_WS
47
48# Location of encumbered binaries.
49ON_CLOSED_BINS="$CODEMGR_WS/closed";		export ON_CLOSED_BINS
50
51# This flag controls whether to build the closed source.  If
52# undefined, nightly(1) and bldenv(1) will set it according to whether
53# the closed source tree is present.  CLOSED_IS_PRESENT="no" means not
54# building the closed sources.
55# CLOSED_IS_PRESENT="no";		export CLOSED_IS_PRESENT
56
57# Maximum number of dmake jobs.  The recommended number is 2 + (2 *
58# NCPUS), where NCPUS is the number of CPUs on your build system.
59maxjobs() {
60	ncpu=`/usr/sbin/psrinfo -p`
61	expr $ncpu \* 2 + 2
62}
63DMAKE_MAX_JOBS=`maxjobs`;			export DMAKE_MAX_JOBS
64
65# path to onbld tool binaries
66ONBLD_BIN="/opt/onbld/bin"
67
68# PARENT_WS is used to determine the parent of this workspace. This is
69# for the options that deal with the parent workspace (such as where the
70# proto area will go).
71PARENT_WS="";			export PARENT_WS
72
73# CLONE_WS is the workspace nightly should do a bringover from.
74CLONE_WS="ssh://anon@hg.opensolaris.org//hg/onnv/onnv-gate"
75export CLONE_WS
76
77# The bringover, if any, is done as STAFFER.
78# Set STAFFER to your own login as gatekeeper or developer
79# The point is to use group "staff" and avoid referencing the parent
80# workspace as root.
81# Some scripts optionally send mail messages to MAILTO.
82#
83STAFFER=nobody;				export STAFFER
84MAILTO=$STAFFER;			export MAILTO
85
86# The project (see project(4)) under which to run this build.  If not
87# specified, the build is simply run in a new task in the current project.
88BUILD_PROJECT=;				export BUILD_PROJECT
89
90# You should not need to change the next four lines
91LOCKNAME="`basename $CODEMGR_WS`_nightly.lock"; export LOCKNAME
92ATLOG="$CODEMGR_WS/log";			export ATLOG
93LOGFILE="$ATLOG/nightly.log";			export LOGFILE
94MACH=`uname -p`;				export MACH
95
96# Location of signed cryptographic binaries.
97ON_CRYPTO_BINS="$CODEMGR_WS/on-crypto.$MACH.tar.bz2"
98export ON_CRYPTO_BINS
99
100# REF_PROTO_LIST - for comparing the list of stuff in your proto area
101# with. Generally this should be left alone, since you want to see differences
102# from your parent (the gate).
103#
104REF_PROTO_LIST=$PARENT_WS/usr/src/proto_list_${MACH}; export REF_PROTO_LIST
105
106#
107#	build environment variables, including version info for mcs, motd,
108# motd, uname and boot messages. Mostly you shouldn't change this except
109# when the release slips (nah) or you move an environment file to a new
110# release
111#
112ROOT="$CODEMGR_WS/proto/root_${MACH}";	export ROOT
113SRC="$CODEMGR_WS/usr/src";         	export SRC
114VERSION="$GATE";			export VERSION
115
116#
117# the RELEASE and RELEASE_DATE variables are set in Makefile.master;
118# there might be special reasons to override them here, but that
119# should not be the case in general
120#
121# RELEASE="5.11";			export RELEASE
122# RELEASE_DATE="October 2007";		export RELEASE_DATE
123
124# proto area in parent for optionally depositing a copy of headers and
125# libraries corresponding to the protolibs target
126# not applicable given the NIGHTLY_OPTIONS
127#
128PARENT_ROOT=$PARENT_WS/proto/root_$MACH; export PARENT_ROOT
129PARENT_TOOLS_ROOT=$PARENT_WS/usr/src/tools/proto/root_$MACH-nd; export PARENT_TOOLS_ROOT
130
131# Package creation variables.  You probably shouldn't change these,
132# either.
133#
134# PKGARCHIVE determines where the repository will be created.
135#
136# PKGPUBLISHER_REDIST controls the publisher setting for the repository.
137#
138PKGARCHIVE="${CODEMGR_WS}/packages/${MACH}/nightly";	export PKGARCHIVE
139# PKGPUBLISHER_REDIST="on-redist";			export PKGPUBLISHER_REDIST
140
141# we want make to do as much as it can, just in case there's more than
142# one problem.
143MAKEFLAGS=k;	export MAKEFLAGS
144
145# Magic variable to prevent the devpro compilers/teamware from sending
146# mail back to devpro on every use.
147UT_NO_USAGE_TRACKING="1"; export UT_NO_USAGE_TRACKING
148
149# Build tools - don't change these unless you know what you're doing.  These
150# variables allows you to get the compilers and onbld files locally or
151# through cachefs.  Set BUILD_TOOLS to pull everything from one location.
152# Alternately, you can set ONBLD_TOOLS to where you keep the contents of
153# SUNWonbld and SPRO_ROOT to where you keep the compilers.  SPRO_VROOT
154# exists to make it easier to test new versions of the compiler.
155BUILD_TOOLS=/opt;				export BUILD_TOOLS
156#ONBLD_TOOLS=/opt/onbld;			export ONBLD_TOOLS
157SPRO_ROOT=/opt/SUNWspro;			export SPRO_ROOT
158SPRO_VROOT=$SPRO_ROOT;				export SPRO_VROOT
159
160# This goes along with lint - it is a series of the form "A [y|n]" which
161# means "go to directory A and run 'make lint'" Then mail me (y) the
162# difference in the lint output. 'y' should only be used if the area you're
163# linting is actually lint clean or you'll get lots of mail.
164# You shouldn't need to change this though.
165#LINTDIRS="$SRC y";	export LINTDIRS
166
167# Set this flag to 'n' to disable the automatic validation of the dmake
168# version in use.  The default is to check it.
169#CHECK_DMAKE=y
170
171# Set this flag to 'n' to disable the use of 'checkpaths'.  The default,
172# if the 'N' option is not specified, is to run this test.
173#CHECK_PATHS=y
174
175# BRINGOVER_FILES is the list of files nightly passes to bringover.
176# If not set the default is "usr", but it can be used for bringing
177# over deleted_files or other nifty directories.
178#BRINGOVER_FILES="usr deleted_files"
179
180# POST_NIGHTLY can be any command to be run at the end of nightly.  See
181# nightly(1) for interactions between environment variables and this command.
182#POST_NIGHTLY=
183