30 # This example is suitable for building an illumos workspace, which
31 # will contain the resulting archives. It is based off the onnv
32 # release. It sets NIGHTLY_OPTIONS to make nightly do:
33 # DEBUG build only (-D, -F)
34 # do not bringover from the parent (-n)
35 # runs 'make check' (-C)
36 # checks for new interfaces in libraries (-A)
37 # runs lint in usr/src (-l plus the LINTDIRS variable)
38 # sends mail on completion (-m and the MAILTO variable)
39 # creates packages for PIT/RE (-p)
40 # checks for changes in ELF runpaths (-r)
41 # build and use this workspace's tools in $SRC/tools (-t)
42 #
43 # - This file is sourced by "bldenv.sh" and "nightly.sh" and should not
44 # be executed directly.
45 # - This script is only interpreted by ksh93 and explicitly allows the
46 # use of ksh93 language extensions.
47 #
48 export NIGHTLY_OPTIONS='-FnCDAlmprt'
49
50 #
51 # -- PLEASE READ THIS --
52 #
53 # The variables GATE and CODEMGR_WS must always be customised to
54 # match your workspace/gate location!!
55 #
56 # -- PLEASE READ THIS --
57 #
58
59 # This is a variable for the rest of the script - GATE doesn't matter to
60 # nightly itself
61 export GATE='testws'
62
63 # CODEMGR_WS - where is your workspace at (or what should nightly name it)
64 export CODEMGR_WS="$HOME/ws/$GATE"
65
66 # Maximum number of dmake jobs. The recommended number is 2 + NCPUS,
67 # where NCPUS is the number of logical CPUs on your build system.
68 function maxjobs
69 {
70 nameref maxjobs=$1
71 integer ncpu
72 integer -r min_mem_per_job=512 # minimum amount of memory for a job
73
74 ncpu=$(builtin getconf ; getconf 'NPROCESSORS_ONLN')
75 (( maxjobs=ncpu + 2 ))
76
77 # Throttle number of parallel jobs launched by dmake to a value which
78 # gurantees that all jobs have enough memory. This was added to avoid
79 # excessive paging/swapping in cases of virtual machine installations
80 # which have lots of CPUs but not enough memory assigned to handle
81 # that many parallel jobs
82 if [[ $(/usr/sbin/prtconf 2>'/dev/null') == ~(E)Memory\ size:\ ([[:digit:]]+)\ Megabytes ]] ; then
83 integer max_jobs_per_memory # parallel jobs which fit into physical memory
84 integer physical_memory # physical memory installed
143 # Location of signed cryptographic binaries.
144 export ON_CRYPTO_BINS="$CODEMGR_WS/on-crypto.$MACH.tar.bz2"
145
146 # REF_PROTO_LIST - for comparing the list of stuff in your proto area
147 # with. Generally this should be left alone, since you want to see differences
148 # from your parent (the gate).
149 #
150 export REF_PROTO_LIST="$PARENT_WS/usr/src/proto_list_${MACH}"
151
152
153 export ROOT="$CODEMGR_WS/proto/root_${MACH}"
154 export SRC="$CODEMGR_WS/usr/src"
155 export MULTI_PROTO="no"
156
157 #
158 # build environment variables, including version info for mcs, motd,
159 # motd, uname and boot messages. Mostly you shouldn't change this except
160 # when the release slips (nah) or you move an environment file to a new
161 # release
162 #
163 export VERSION="$GATE"
164
165 #
166 # the RELEASE and RELEASE_DATE variables are set in Makefile.master;
167 # there might be special reasons to override them here, but that
168 # should not be the case in general
169 #
170 # export RELEASE='5.11'
171 # export RELEASE_DATE='October 2007'
172
173 # proto area in parent for optionally depositing a copy of headers and
174 # libraries corresponding to the protolibs target
175 # not applicable given the NIGHTLY_OPTIONS
176 #
177 export PARENT_ROOT="$PARENT_WS/proto/root_$MACH"
178 export PARENT_TOOLS_ROOT="$PARENT_WS/usr/src/tools/proto/root_$MACH-nd"
179
180 # Package creation variables. You probably shouldn't change these,
181 # either.
182 #
183 # PKGARCHIVE determines where the repository will be created.
|
30 # This example is suitable for building an illumos workspace, which
31 # will contain the resulting archives. It is based off the onnv
32 # release. It sets NIGHTLY_OPTIONS to make nightly do:
33 # DEBUG build only (-D, -F)
34 # do not bringover from the parent (-n)
35 # runs 'make check' (-C)
36 # checks for new interfaces in libraries (-A)
37 # runs lint in usr/src (-l plus the LINTDIRS variable)
38 # sends mail on completion (-m and the MAILTO variable)
39 # creates packages for PIT/RE (-p)
40 # checks for changes in ELF runpaths (-r)
41 # build and use this workspace's tools in $SRC/tools (-t)
42 #
43 # - This file is sourced by "bldenv.sh" and "nightly.sh" and should not
44 # be executed directly.
45 # - This script is only interpreted by ksh93 and explicitly allows the
46 # use of ksh93 language extensions.
47 #
48 export NIGHTLY_OPTIONS='-FnCDAlmprt'
49
50 # CODEMGR_WS - where is your workspace at
51 #export CODEMGR_WS="$HOME/ws/illumos-gate"
52 export CODEMGR_WS="`git rev-parse --show-toplevel`"
53
54 # Maximum number of dmake jobs. The recommended number is 2 + NCPUS,
55 # where NCPUS is the number of logical CPUs on your build system.
56 function maxjobs
57 {
58 nameref maxjobs=$1
59 integer ncpu
60 integer -r min_mem_per_job=512 # minimum amount of memory for a job
61
62 ncpu=$(builtin getconf ; getconf 'NPROCESSORS_ONLN')
63 (( maxjobs=ncpu + 2 ))
64
65 # Throttle number of parallel jobs launched by dmake to a value which
66 # gurantees that all jobs have enough memory. This was added to avoid
67 # excessive paging/swapping in cases of virtual machine installations
68 # which have lots of CPUs but not enough memory assigned to handle
69 # that many parallel jobs
70 if [[ $(/usr/sbin/prtconf 2>'/dev/null') == ~(E)Memory\ size:\ ([[:digit:]]+)\ Megabytes ]] ; then
71 integer max_jobs_per_memory # parallel jobs which fit into physical memory
72 integer physical_memory # physical memory installed
131 # Location of signed cryptographic binaries.
132 export ON_CRYPTO_BINS="$CODEMGR_WS/on-crypto.$MACH.tar.bz2"
133
134 # REF_PROTO_LIST - for comparing the list of stuff in your proto area
135 # with. Generally this should be left alone, since you want to see differences
136 # from your parent (the gate).
137 #
138 export REF_PROTO_LIST="$PARENT_WS/usr/src/proto_list_${MACH}"
139
140
141 export ROOT="$CODEMGR_WS/proto/root_${MACH}"
142 export SRC="$CODEMGR_WS/usr/src"
143 export MULTI_PROTO="no"
144
145 #
146 # build environment variables, including version info for mcs, motd,
147 # motd, uname and boot messages. Mostly you shouldn't change this except
148 # when the release slips (nah) or you move an environment file to a new
149 # release
150 #
151 export VERSION="`git describe --long --all HEAD | cut -d/ -f2-`"
152
153 #
154 # the RELEASE and RELEASE_DATE variables are set in Makefile.master;
155 # there might be special reasons to override them here, but that
156 # should not be the case in general
157 #
158 # export RELEASE='5.11'
159 # export RELEASE_DATE='October 2007'
160
161 # proto area in parent for optionally depositing a copy of headers and
162 # libraries corresponding to the protolibs target
163 # not applicable given the NIGHTLY_OPTIONS
164 #
165 export PARENT_ROOT="$PARENT_WS/proto/root_$MACH"
166 export PARENT_TOOLS_ROOT="$PARENT_WS/usr/src/tools/proto/root_$MACH-nd"
167
168 # Package creation variables. You probably shouldn't change these,
169 # either.
170 #
171 # PKGARCHIVE determines where the repository will be created.
|