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