1eb8f03cdSGarrett D'Amore# 2eb8f03cdSGarrett D'Amore# CDDL HEADER START 3eb8f03cdSGarrett D'Amore# 4eb8f03cdSGarrett D'Amore# The contents of this file are subject to the terms of the 5eb8f03cdSGarrett D'Amore# Common Development and Distribution License (the "License"). 6eb8f03cdSGarrett D'Amore# You may not use this file except in compliance with the License. 7eb8f03cdSGarrett D'Amore# 8eb8f03cdSGarrett D'Amore# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9eb8f03cdSGarrett D'Amore# or http://www.opensolaris.org/os/licensing. 10eb8f03cdSGarrett D'Amore# See the License for the specific language governing permissions 11eb8f03cdSGarrett D'Amore# and limitations under the License. 12eb8f03cdSGarrett D'Amore# 13eb8f03cdSGarrett D'Amore# When distributing Covered Code, include this CDDL HEADER in each 14eb8f03cdSGarrett D'Amore# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15eb8f03cdSGarrett D'Amore# If applicable, add the following below this CDDL HEADER, with the 16eb8f03cdSGarrett D'Amore# fields enclosed by brackets "[]" replaced with your own identifying 17eb8f03cdSGarrett D'Amore# information: Portions Copyright [yyyy] [name of copyright owner] 18eb8f03cdSGarrett D'Amore# 19eb8f03cdSGarrett D'Amore# CDDL HEADER END 20eb8f03cdSGarrett D'Amore# 21eb8f03cdSGarrett D'Amore# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 22eb8f03cdSGarrett D'Amore# 23eb8f03cdSGarrett D'Amore 24eb8f03cdSGarrett D'Amore# Configuration variables for the runtime environment of the nightly 25eb8f03cdSGarrett D'Amore# build script and other tools for construction and packaging of releases. 26eb8f03cdSGarrett D'Amore# This script is sourced by 'nightly' and 'bldenv' to set up the environment 27eb8f03cdSGarrett D'Amore# for the build. This example is suitable for building an OpenSolaris 28eb8f03cdSGarrett D'Amore# workspace, which will contain the resulting archives. It is based 29eb8f03cdSGarrett D'Amore# off the onnv release. It sets NIGHTLY_OPTIONS to make nightly do: 30eb8f03cdSGarrett D'Amore# DEBUG build only (-D, -F) 31eb8f03cdSGarrett D'Amore# do not bringover from the parent (-n) 32eb8f03cdSGarrett D'Amore# runs 'make check' (-C) 33eb8f03cdSGarrett D'Amore# runs lint in usr/src (-l plus the LINTDIRS variable) 34eb8f03cdSGarrett D'Amore# sends mail on completion (-m and the MAILTO variable) 35eb8f03cdSGarrett D'Amore# creates packages for PIT/RE (-p) 36eb8f03cdSGarrett D'Amore# checks for changes in ELF runpaths (-r) 37eb8f03cdSGarrett D'Amore# build and use this workspace's tools in $SRC/tools (-t) 38eb8f03cdSGarrett D'Amore# 39eb8f03cdSGarrett D'AmoreNIGHTLY_OPTIONS="-FnCDlmprt"; export NIGHTLY_OPTIONS 40eb8f03cdSGarrett D'Amore 41eb8f03cdSGarrett D'Amore# This is a variable for the rest of the script - GATE doesn't matter to 42eb8f03cdSGarrett D'Amore# nightly itself 43eb8f03cdSGarrett D'AmoreGATE=testws; export GATE 44eb8f03cdSGarrett D'Amore 45eb8f03cdSGarrett D'Amore# CODEMGR_WS - where is your workspace at (or what should nightly name it) 46eb8f03cdSGarrett D'AmoreCODEMGR_WS="/export/$GATE"; export CODEMGR_WS 47eb8f03cdSGarrett D'Amore 48eb8f03cdSGarrett D'Amore# 49eb8f03cdSGarrett D'Amore# The following two macros are the closed/crypto binaries. Once 50eb8f03cdSGarrett D'Amore# Illumos has totally freed itself, we can remove these references. 51eb8f03cdSGarrett D'Amore# 52eb8f03cdSGarrett D'Amore# Location of encumbered binaries. 53eb8f03cdSGarrett D'AmoreON_CLOSED_BINS="$CODEMGR_WS/closed"; export ON_CLOSED_BINS 54eb8f03cdSGarrett D'Amore# Location of signed cryptographic binaries. 55eb8f03cdSGarrett D'AmoreON_CRYPTO_BINS="$CODEMGR_WS/on-crypto.$MACH.tar.bz2" export ON_CRYPTO_BINS 56eb8f03cdSGarrett D'Amore 57eb8f03cdSGarrett D'Amore 58*d43a4e79SJeppe Toustrup# Maximum number of dmake jobs. The recommended number is 2 + NCPUS, 59*d43a4e79SJeppe Toustrup# where NCPUS is the number of logical CPUs on your build system. 60eb8f03cdSGarrett D'Amoremaxjobs() { 61*d43a4e79SJeppe Toustrup ncpu=`kstat -p cpu_info:::state | grep -c on-line` 62*d43a4e79SJeppe Toustrup expr $ncpu + 2 63eb8f03cdSGarrett D'Amore} 64eb8f03cdSGarrett D'AmoreDMAKE_MAX_JOBS=`maxjobs`; export DMAKE_MAX_JOBS 65eb8f03cdSGarrett D'Amore 66eb8f03cdSGarrett D'Amore# path to onbld tool binaries 67eb8f03cdSGarrett D'AmoreONBLD_BIN="/opt/onbld/bin" 68eb8f03cdSGarrett D'Amore 69eb8f03cdSGarrett D'Amore# PARENT_WS is used to determine the parent of this workspace. This is 70eb8f03cdSGarrett D'Amore# for the options that deal with the parent workspace (such as where the 71eb8f03cdSGarrett D'Amore# proto area will go). 72eb8f03cdSGarrett D'AmorePARENT_WS=""; export PARENT_WS 73eb8f03cdSGarrett D'Amore 74eb8f03cdSGarrett D'Amore# CLONE_WS is the workspace nightly should do a bringover from. 75eb8f03cdSGarrett D'AmoreCLONE_WS="http://hg.illumos.org/illumos-gate" 76eb8f03cdSGarrett D'Amoreexport CLONE_WS 77eb8f03cdSGarrett D'Amore 78eb8f03cdSGarrett D'Amore# The bringover, if any, is done as STAFFER. 79eb8f03cdSGarrett D'Amore# Set STAFFER to your own login as gatekeeper or developer 80eb8f03cdSGarrett D'Amore# The point is to use group "staff" and avoid referencing the parent 81eb8f03cdSGarrett D'Amore# workspace as root. 82eb8f03cdSGarrett D'Amore# Some scripts optionally send mail messages to MAILTO. 83eb8f03cdSGarrett D'Amore# 84eb8f03cdSGarrett D'AmoreSTAFFER=nobody; export STAFFER 85eb8f03cdSGarrett D'AmoreMAILTO=$STAFFER; export MAILTO 86eb8f03cdSGarrett D'Amore 87eb8f03cdSGarrett D'Amore# The project (see project(4)) under which to run this build. If not 88eb8f03cdSGarrett D'Amore# specified, the build is simply run in a new task in the current project. 89eb8f03cdSGarrett D'AmoreBUILD_PROJECT=; export BUILD_PROJECT 90eb8f03cdSGarrett D'Amore 91eb8f03cdSGarrett D'Amore# You should not need to change the next four lines 92eb8f03cdSGarrett D'AmoreLOCKNAME="`basename $CODEMGR_WS`_nightly.lock"; export LOCKNAME 93eb8f03cdSGarrett D'AmoreATLOG="$CODEMGR_WS/log"; export ATLOG 94eb8f03cdSGarrett D'AmoreLOGFILE="$ATLOG/nightly.log"; export LOGFILE 95eb8f03cdSGarrett D'AmoreMACH=`uname -p`; export MACH 96eb8f03cdSGarrett D'Amore 97eb8f03cdSGarrett D'Amore# REF_PROTO_LIST - for comparing the list of stuff in your proto area 98eb8f03cdSGarrett D'Amore# with. Generally this should be left alone, since you want to see differences 99eb8f03cdSGarrett D'Amore# from your parent (the gate). 100eb8f03cdSGarrett D'Amore# 101eb8f03cdSGarrett D'AmoreREF_PROTO_LIST=$PARENT_WS/usr/src/proto_list_${MACH}; export REF_PROTO_LIST 102eb8f03cdSGarrett D'Amore 103eb8f03cdSGarrett D'Amore# 104eb8f03cdSGarrett D'Amore# build environment variables, including version info for mcs, motd, 105eb8f03cdSGarrett D'Amore# motd, uname and boot messages. Mostly you shouldn't change this except 106eb8f03cdSGarrett D'Amore# when the release slips (nah) or you move an environment file to a new 107eb8f03cdSGarrett D'Amore# release 108eb8f03cdSGarrett D'Amore# 109eb8f03cdSGarrett D'AmoreROOT="$CODEMGR_WS/proto/root_${MACH}"; export ROOT 110eb8f03cdSGarrett D'AmoreSRC="$CODEMGR_WS/usr/src"; export SRC 111eb8f03cdSGarrett D'AmoreVERSION="$GATE"; export VERSION 112eb8f03cdSGarrett D'Amore 113eb8f03cdSGarrett D'Amore# 114eb8f03cdSGarrett D'Amore# the RELEASE and RELEASE_DATE variables are set in Makefile.master; 115eb8f03cdSGarrett D'Amore# there might be special reasons to override them here, but that 116eb8f03cdSGarrett D'Amore# should not be the case in general 117eb8f03cdSGarrett D'Amore# 118eb8f03cdSGarrett D'Amore# RELEASE="5.11"; export RELEASE 119eb8f03cdSGarrett D'Amore# RELEASE_DATE="October 2007"; export RELEASE_DATE 120eb8f03cdSGarrett D'Amore 121eb8f03cdSGarrett D'Amore# proto area in parent for optionally depositing a copy of headers and 122eb8f03cdSGarrett D'Amore# libraries corresponding to the protolibs target 123eb8f03cdSGarrett D'Amore# not applicable given the NIGHTLY_OPTIONS 124eb8f03cdSGarrett D'Amore# 125eb8f03cdSGarrett D'AmorePARENT_ROOT=$PARENT_WS/proto/root_$MACH; export PARENT_ROOT 126eb8f03cdSGarrett D'AmorePARENT_TOOLS_ROOT=$PARENT_WS/usr/src/tools/proto/root_$MACH-nd; export PARENT_TOOLS_ROOT 127eb8f03cdSGarrett D'Amore 128eb8f03cdSGarrett D'Amore# Package creation variables. You probably shouldn't change these, 129eb8f03cdSGarrett D'Amore# either. 130eb8f03cdSGarrett D'Amore# 131eb8f03cdSGarrett D'Amore# PKGARCHIVE determines where the repository will be created. 132eb8f03cdSGarrett D'Amore# 133eb8f03cdSGarrett D'Amore# PKGPUBLISHER_REDIST controls the publisher setting for the repository. 134eb8f03cdSGarrett D'Amore# 135eb8f03cdSGarrett D'AmorePKGARCHIVE="${CODEMGR_WS}/packages/${MACH}/nightly"; export PKGARCHIVE 136eb8f03cdSGarrett D'Amore# PKGPUBLISHER_REDIST="on-redist"; export PKGPUBLISHER_REDIST 137eb8f03cdSGarrett D'Amore 138eb8f03cdSGarrett D'Amore# we want make to do as much as it can, just in case there's more than 139eb8f03cdSGarrett D'Amore# one problem. 140eb8f03cdSGarrett D'AmoreMAKEFLAGS=k; export MAKEFLAGS 141eb8f03cdSGarrett D'Amore 142eb8f03cdSGarrett D'Amore# Magic variable to prevent the devpro compilers/teamware from sending 143eb8f03cdSGarrett D'Amore# mail back to devpro on every use. 144eb8f03cdSGarrett D'AmoreUT_NO_USAGE_TRACKING="1"; export UT_NO_USAGE_TRACKING 145eb8f03cdSGarrett D'Amore 146eb8f03cdSGarrett D'Amore# Build tools - don't change these unless you know what you're doing. These 147eb8f03cdSGarrett D'Amore# variables allows you to get the compilers and onbld files locally or 148eb8f03cdSGarrett D'Amore# through cachefs. Set BUILD_TOOLS to pull everything from one location. 149eb8f03cdSGarrett D'Amore# Alternately, you can set ONBLD_TOOLS to where you keep the contents of 150eb8f03cdSGarrett D'Amore# SUNWonbld and SPRO_ROOT to where you keep the compilers. SPRO_VROOT 151eb8f03cdSGarrett D'Amore# exists to make it easier to test new versions of the compiler. 152eb8f03cdSGarrett D'AmoreBUILD_TOOLS=/opt; export BUILD_TOOLS 153eb8f03cdSGarrett D'Amore#ONBLD_TOOLS=/opt/onbld; export ONBLD_TOOLS 154eb8f03cdSGarrett D'AmoreSPRO_ROOT=/opt/SUNWspro; export SPRO_ROOT 155eb8f03cdSGarrett D'AmoreSPRO_VROOT=$SPRO_ROOT; export SPRO_VROOT 156eb8f03cdSGarrett D'Amore 157eb8f03cdSGarrett D'Amore# This goes along with lint - it is a series of the form "A [y|n]" which 158eb8f03cdSGarrett D'Amore# means "go to directory A and run 'make lint'" Then mail me (y) the 159eb8f03cdSGarrett D'Amore# difference in the lint output. 'y' should only be used if the area you're 160eb8f03cdSGarrett D'Amore# linting is actually lint clean or you'll get lots of mail. 161eb8f03cdSGarrett D'Amore# You shouldn't need to change this though. 162eb8f03cdSGarrett D'Amore#LINTDIRS="$SRC y"; export LINTDIRS 163eb8f03cdSGarrett D'Amore 164eb8f03cdSGarrett D'Amore# Set this flag to 'n' to disable the automatic validation of the dmake 165eb8f03cdSGarrett D'Amore# version in use. The default is to check it. 166eb8f03cdSGarrett D'Amore#CHECK_DMAKE=y 167eb8f03cdSGarrett D'Amore 168eb8f03cdSGarrett D'Amore# Set this flag to 'n' to disable the use of 'checkpaths'. The default, 169eb8f03cdSGarrett D'Amore# if the 'N' option is not specified, is to run this test. 170eb8f03cdSGarrett D'Amore#CHECK_PATHS=y 171eb8f03cdSGarrett D'Amore 172eb8f03cdSGarrett D'Amore# POST_NIGHTLY can be any command to be run at the end of nightly. See 173eb8f03cdSGarrett D'Amore# nightly(1) for interactions between environment variables and this command. 174eb8f03cdSGarrett D'Amore#POST_NIGHTLY= 175