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