147 esac
148 done
149 shift $((OPTIND-1))
150
151 # test that the path to the environment-setting file was given
152 if (( $# < 1 )) ; then
153 usage
154 fi
155
156 # force locale to C
157 export \
158 LC_COLLATE=C \
159 LC_CTYPE=C \
160 LC_MESSAGES=C \
161 LC_MONETARY=C \
162 LC_NUMERIC=C \
163 LC_TIME=C
164
165 # clear environment variables we know to be bad for the build
166 unset \
167 LD_OPTIONS \
168 LD_LIBRARY_PATH \
169 LD_AUDIT \
170 LD_BIND_NOW \
171 LD_BREADTH \
172 LD_CONFIG \
173 LD_DEBUG \
174 LD_FLAGS \
175 LD_LIBRARY_PATH_64 \
176 LD_NOVERSION \
177 LD_ORIGIN \
178 LD_LOADFLTR \
179 LD_NOAUXFLTR \
180 LD_NOCONFIG \
181 LD_NODIRCONFIG \
182 LD_NOOBJALTER \
183 LD_PRELOAD \
184 LD_PROFILE \
185 CONFIG \
186 GROUP \
210 printf \
211 'Cannot find env file as either %s or /opt/onbld/env/%s\n' \
212 "$1" "$1"
213 exit 1
214 fi
215 fi
216 shift
217
218 # contents of stdenv.sh inserted after next line:
219 # STDENV_START
220 # STDENV_END
221
222 # Check if we have sufficient data to continue...
223 [[ -v CODEMGR_WS ]] || fatal_error "Error: Variable CODEMGR_WS not set."
224 [[ -d "${CODEMGR_WS}" ]] || fatal_error "Error: ${CODEMGR_WS} is not a directory."
225 [[ -f "${CODEMGR_WS}/usr/src/Makefile" ]] || fatal_error "Error: ${CODEMGR_WS}/usr/src/Makefile not found."
226
227 # must match the getopts in nightly.sh
228 OPTIND=1
229 NIGHTLY_OPTIONS="-${NIGHTLY_OPTIONS#-}"
230 while getopts '+0AaBCDdFfGIilMmNnopRrtUuWwXxz' FLAG "$NIGHTLY_OPTIONS"
231 do
232 case "$FLAG" in
233 o) flags.o=true ;;
234 +o) flags.o=false ;;
235 t) flags.t=true ;;
236 +t) flags.t=false ;;
237 *) ;;
238 esac
239 done
240
241 POUND_SIGN="#"
242 # have we set RELEASE_DATE in our env file?
243 if [ -z "$RELEASE_DATE" ]; then
244 RELEASE_DATE=$(LC_ALL=C date +"%B %Y")
245 fi
246 BUILD_DATE=$(LC_ALL=C date +%Y-%b-%d)
247 BASEWSDIR=$(basename -- "${CODEMGR_WS}")
248 DEV_CM="\"@(#)SunOS Internal Development: $LOGNAME $BUILD_DATE [$BASEWSDIR]\""
249 export DEV_CM RELEASE_DATE POUND_SIGN
250
251 print 'Build type is \c'
252 if ${flags.d} ; then
253 print 'DEBUG'
254 unset RELEASE_BUILD
286 if "${flags.t}" ; then
287 export ONBLD_TOOLS="${ONBLD_TOOLS:=${TOOLS_PROTO}/opt/onbld}"
288
289 export STABS="${TOOLS_PROTO}/opt/onbld/bin/${MACH}/stabs"
290 export CTFSTABS="${TOOLS_PROTO}/opt/onbld/bin/${MACH}/ctfstabs"
291 export GENOFFSETS="${TOOLS_PROTO}/opt/onbld/bin/genoffsets"
292
293 export CTFCONVERT="${TOOLS_PROTO}/opt/onbld/bin/${MACH}/ctfconvert"
294 export CTFMERGE="${TOOLS_PROTO}/opt/onbld/bin/${MACH}/ctfmerge"
295
296 export CTFCVTPTBL="${TOOLS_PROTO}/opt/onbld/bin/ctfcvtptbl"
297 export CTFFINDMOD="${TOOLS_PROTO}/opt/onbld/bin/ctffindmod"
298
299 PATH="${TOOLS_PROTO}/opt/onbld/bin/${MACH}:${PATH}"
300 PATH="${TOOLS_PROTO}/opt/onbld/bin:${PATH}"
301 export PATH
302 fi
303
304 export DMAKE_MODE=${DMAKE_MODE:-parallel}
305
306 if "${flags.o}" ; then
307 export CH=
308 else
309 unset CH
310 fi
311 DEF_STRIPFLAG="-s"
312
313 TMPDIR="/tmp"
314
315 # "o_FLAG" is used by "nightly.sh" (it may be useful to rename this
316 # variable using a more descriptive name later)
317 export o_FLAG="$(${flags.o} && print 'y' || print 'n')"
318
319 export \
320 PATH TMPDIR \
321 POUND_SIGN \
322 DEF_STRIPFLAG \
323 RELEASE_DATE
324 unset \
325 CFLAGS \
326 LD_LIBRARY_PATH
327
328 # a la ws
329 ENVLDLIBS1=
330 ENVLDLIBS2=
331 ENVLDLIBS3=
332 ENVCPPFLAGS1=
333 ENVCPPFLAGS2=
334 ENVCPPFLAGS3=
335 ENVCPPFLAGS4=
336 PARENT_ROOT=
337 PARENT_TOOLS_ROOT=
338
|
147 esac
148 done
149 shift $((OPTIND-1))
150
151 # test that the path to the environment-setting file was given
152 if (( $# < 1 )) ; then
153 usage
154 fi
155
156 # force locale to C
157 export \
158 LC_COLLATE=C \
159 LC_CTYPE=C \
160 LC_MESSAGES=C \
161 LC_MONETARY=C \
162 LC_NUMERIC=C \
163 LC_TIME=C
164
165 # clear environment variables we know to be bad for the build
166 unset \
167 CH \
168 LD_OPTIONS \
169 LD_LIBRARY_PATH \
170 LD_AUDIT \
171 LD_BIND_NOW \
172 LD_BREADTH \
173 LD_CONFIG \
174 LD_DEBUG \
175 LD_FLAGS \
176 LD_LIBRARY_PATH_64 \
177 LD_NOVERSION \
178 LD_ORIGIN \
179 LD_LOADFLTR \
180 LD_NOAUXFLTR \
181 LD_NOCONFIG \
182 LD_NODIRCONFIG \
183 LD_NOOBJALTER \
184 LD_PRELOAD \
185 LD_PROFILE \
186 CONFIG \
187 GROUP \
211 printf \
212 'Cannot find env file as either %s or /opt/onbld/env/%s\n' \
213 "$1" "$1"
214 exit 1
215 fi
216 fi
217 shift
218
219 # contents of stdenv.sh inserted after next line:
220 # STDENV_START
221 # STDENV_END
222
223 # Check if we have sufficient data to continue...
224 [[ -v CODEMGR_WS ]] || fatal_error "Error: Variable CODEMGR_WS not set."
225 [[ -d "${CODEMGR_WS}" ]] || fatal_error "Error: ${CODEMGR_WS} is not a directory."
226 [[ -f "${CODEMGR_WS}/usr/src/Makefile" ]] || fatal_error "Error: ${CODEMGR_WS}/usr/src/Makefile not found."
227
228 # must match the getopts in nightly.sh
229 OPTIND=1
230 NIGHTLY_OPTIONS="-${NIGHTLY_OPTIONS#-}"
231 while getopts '+0ABCDdFfGIilMmNnpRrtUuw' FLAG "$NIGHTLY_OPTIONS"
232 do
233 case "$FLAG" in
234 t) flags.t=true ;;
235 +t) flags.t=false ;;
236 *) ;;
237 esac
238 done
239
240 POUND_SIGN="#"
241 # have we set RELEASE_DATE in our env file?
242 if [ -z "$RELEASE_DATE" ]; then
243 RELEASE_DATE=$(LC_ALL=C date +"%B %Y")
244 fi
245 BUILD_DATE=$(LC_ALL=C date +%Y-%b-%d)
246 BASEWSDIR=$(basename -- "${CODEMGR_WS}")
247 DEV_CM="\"@(#)SunOS Internal Development: $LOGNAME $BUILD_DATE [$BASEWSDIR]\""
248 export DEV_CM RELEASE_DATE POUND_SIGN
249
250 print 'Build type is \c'
251 if ${flags.d} ; then
252 print 'DEBUG'
253 unset RELEASE_BUILD
285 if "${flags.t}" ; then
286 export ONBLD_TOOLS="${ONBLD_TOOLS:=${TOOLS_PROTO}/opt/onbld}"
287
288 export STABS="${TOOLS_PROTO}/opt/onbld/bin/${MACH}/stabs"
289 export CTFSTABS="${TOOLS_PROTO}/opt/onbld/bin/${MACH}/ctfstabs"
290 export GENOFFSETS="${TOOLS_PROTO}/opt/onbld/bin/genoffsets"
291
292 export CTFCONVERT="${TOOLS_PROTO}/opt/onbld/bin/${MACH}/ctfconvert"
293 export CTFMERGE="${TOOLS_PROTO}/opt/onbld/bin/${MACH}/ctfmerge"
294
295 export CTFCVTPTBL="${TOOLS_PROTO}/opt/onbld/bin/ctfcvtptbl"
296 export CTFFINDMOD="${TOOLS_PROTO}/opt/onbld/bin/ctffindmod"
297
298 PATH="${TOOLS_PROTO}/opt/onbld/bin/${MACH}:${PATH}"
299 PATH="${TOOLS_PROTO}/opt/onbld/bin:${PATH}"
300 export PATH
301 fi
302
303 export DMAKE_MODE=${DMAKE_MODE:-parallel}
304
305 DEF_STRIPFLAG="-s"
306
307 TMPDIR="/tmp"
308
309 export \
310 PATH TMPDIR \
311 POUND_SIGN \
312 DEF_STRIPFLAG \
313 RELEASE_DATE
314 unset \
315 CFLAGS \
316 LD_LIBRARY_PATH
317
318 # a la ws
319 ENVLDLIBS1=
320 ENVLDLIBS2=
321 ENVLDLIBS3=
322 ENVCPPFLAGS1=
323 ENVCPPFLAGS2=
324 ENVCPPFLAGS3=
325 ENVCPPFLAGS4=
326 PARENT_ROOT=
327 PARENT_TOOLS_ROOT=
328
|