xref: /illumos-gate/usr/src/tools/env/illumos.sh (revision 6ea3c060)
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# Maximum number of dmake jobs.  The recommended number is 2 + NCPUS,
49# where NCPUS is the number of logical CPUs on your build system.
50maxjobs() {
51	ncpu=`kstat -p cpu_info:::state | grep -c on-line`
52	expr $ncpu + 2
53}
54DMAKE_MAX_JOBS=`maxjobs`;			export DMAKE_MAX_JOBS
55
56# path to onbld tool binaries
57ONBLD_BIN="/opt/onbld/bin"
58
59# PARENT_WS is used to determine the parent of this workspace. This is
60# for the options that deal with the parent workspace (such as where the
61# proto area will go).
62PARENT_WS="";			export PARENT_WS
63
64# CLONE_WS is the workspace nightly should do a bringover from.
65CLONE_WS="http://hg.illumos.org/illumos-gate"
66export CLONE_WS
67
68# The bringover, if any, is done as STAFFER.
69# Set STAFFER to your own login as gatekeeper or developer
70# The point is to use group "staff" and avoid referencing the parent
71# workspace as root.
72# Some scripts optionally send mail messages to MAILTO.
73#
74STAFFER=nobody;				export STAFFER
75MAILTO=$STAFFER;			export MAILTO
76
77# The project (see project(4)) under which to run this build.  If not
78# specified, the build is simply run in a new task in the current project.
79BUILD_PROJECT=;				export BUILD_PROJECT
80
81# You should not need to change the next four lines
82LOCKNAME="`basename $CODEMGR_WS`_nightly.lock"; export LOCKNAME
83ATLOG="$CODEMGR_WS/log";			export ATLOG
84LOGFILE="$ATLOG/nightly.log";			export LOGFILE
85MACH=`uname -p`;				export MACH
86
87#
88#  The following two macros are the closed/crypto binaries.  Once
89#  Illumos has totally freed itself, we can remove these references.
90#
91# Location of encumbered binaries.
92ON_CLOSED_BINS="$CODEMGR_WS/closed";		export ON_CLOSED_BINS
93# Location of signed cryptographic binaries.
94ON_CRYPTO_BINS="$CODEMGR_WS/on-crypto.$MACH.tar.bz2"; export ON_CRYPTO_BINS
95
96# REF_PROTO_LIST - for comparing the list of stuff in your proto area
97# with. Generally this should be left alone, since you want to see differences
98# from your parent (the gate).
99#
100REF_PROTO_LIST=$PARENT_WS/usr/src/proto_list_${MACH}; export REF_PROTO_LIST
101
102#
103#	build environment variables, including version info for mcs, motd,
104# motd, uname and boot messages. Mostly you shouldn't change this except
105# when the release slips (nah) or you move an environment file to a new
106# release
107#
108ROOT="$CODEMGR_WS/proto/root_${MACH}";	export ROOT
109SRC="$CODEMGR_WS/usr/src";         	export SRC
110VERSION="$GATE";			export VERSION
111
112#
113# the RELEASE and RELEASE_DATE variables are set in Makefile.master;
114# there might be special reasons to override them here, but that
115# should not be the case in general
116#
117# RELEASE="5.11";			export RELEASE
118# RELEASE_DATE="October 2007";		export RELEASE_DATE
119
120# proto area in parent for optionally depositing a copy of headers and
121# libraries corresponding to the protolibs target
122# not applicable given the NIGHTLY_OPTIONS
123#
124PARENT_ROOT=$PARENT_WS/proto/root_$MACH; export PARENT_ROOT
125PARENT_TOOLS_ROOT=$PARENT_WS/usr/src/tools/proto/root_$MACH-nd; export PARENT_TOOLS_ROOT
126
127# Package creation variables.  You probably shouldn't change these,
128# either.
129#
130# PKGARCHIVE determines where the repository will be created.
131#
132# PKGPUBLISHER_REDIST controls the publisher setting for the repository.
133#
134PKGARCHIVE="${CODEMGR_WS}/packages/${MACH}/nightly";	export PKGARCHIVE
135# PKGPUBLISHER_REDIST="on-redist";			export PKGPUBLISHER_REDIST
136
137# we want make to do as much as it can, just in case there's more than
138# one problem.
139MAKEFLAGS=k;	export MAKEFLAGS
140
141# Magic variable to prevent the devpro compilers/teamware from sending
142# mail back to devpro on every use.
143UT_NO_USAGE_TRACKING="1"; export UT_NO_USAGE_TRACKING
144
145# Build tools - don't change these unless you know what you're doing.  These
146# variables allows you to get the compilers and onbld files locally or
147# through cachefs.  Set BUILD_TOOLS to pull everything from one location.
148# Alternately, you can set ONBLD_TOOLS to where you keep the contents of
149# SUNWonbld and SPRO_ROOT to where you keep the compilers.  SPRO_VROOT
150# exists to make it easier to test new versions of the compiler.
151BUILD_TOOLS=/opt;				export BUILD_TOOLS
152#ONBLD_TOOLS=/opt/onbld;			export ONBLD_TOOLS
153SPRO_ROOT=/opt/SUNWspro;			export SPRO_ROOT
154SPRO_VROOT=$SPRO_ROOT;				export SPRO_VROOT
155
156# This goes along with lint - it is a series of the form "A [y|n]" which
157# means "go to directory A and run 'make lint'" Then mail me (y) the
158# difference in the lint output. 'y' should only be used if the area you're
159# linting is actually lint clean or you'll get lots of mail.
160# You shouldn't need to change this though.
161#LINTDIRS="$SRC y";	export LINTDIRS
162
163# Set this flag to 'n' to disable the automatic validation of the dmake
164# version in use.  The default is to check it.
165#CHECK_DMAKE=y
166
167# Set this flag to 'n' to disable the use of 'checkpaths'.  The default,
168# if the 'N' option is not specified, is to run this test.
169#CHECK_PATHS=y
170
171# POST_NIGHTLY can be any command to be run at the end of nightly.  See
172# nightly(1) for interactions between environment variables and this command.
173#POST_NIGHTLY=
174