buildit revision 1423
98N/A# Script for building OpenSolaris X Consolidation 98N/A########################################################################### 98N/A# Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. 98N/A# Permission is hereby granted, free of charge, to any person obtaining a 98N/A# copy of this software and associated documentation files (the "Software"), 98N/A# to deal in the Software without restriction, including without limitation 98N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense, 98N/A# and/or sell copies of the Software, and to permit persons to whom the 98N/A# Software is furnished to do so, subject to the following conditions: 98N/A# The above copyright notice and this permission notice (including the next 98N/A# paragraph) shall be included in all copies or substantial portions of the 98N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 98N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 98N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 98N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 98N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 98N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 98N/A# DEALINGS IN THE SOFTWARE. 98N/A########################################################################### 156N/A# Add /usr/sbin to path for dtrace (to build probes in X servers) 98N/A print -u2 "${progname}: ERROR: $*" 98N/A ?)
print -
u2 "USAGE: $0 [-p [-P publisher]] [-s] [-v]";
exit 2 ;;
98N/Aif [[ $? !=
0 ]] ;
then 98N/A print -
u2 "USAGE: $0 [-p [-P publisher]] [-v]" 98N/A# Send all further output & errors to the log file 98N/A# Extract variables from makefiles via make and set them in the shell 98N/A# for every module built 98N/A *) print "${tag}" ;; 156N/Aprint "------------------------------------------------------------------------------" 98N/Aprint "Building gate at hg id: ${XBUILD_HG_ID}" 98N/Aprint "Using these tools: " 98N/A# Make sure Sun C compiler is at least version 5.10 (Studio 12 Update 1) 98N/Acc -V
2>&
1 |
perl -n -e
'if (($_ =~ m| C (\d+).(\d+)|)) { \ 98N/A print $_ ; print "*** Compiler too old!\n" if ( ($1 != 5) || ($2 < 10) ) }' 98N/A# Log paths & versions of tools which use gnu standard --version flag 380N/A# Exported to stop Studio compilers from reporting home on each usage 98N/Aprint "Using these environment variables: " 98N/Aprint "------------------------------------------------------------------------------" # Clean new proto areas for this architecture # Generate source release while tree is in clean state, but ensure we have all # the required tarballs for both platforms, (and no extras/old ones) first. if [
"${MAKE_SRC_RELEASE}" =
1 ] ;
then if [[
"${USE_PARFAIT}" ==
"yes" ]] ;
then -j
"${DMAKE_MAX_JOBS:-100%}" -r
"${XBUILD_HG_ID}" \
print "\nFinished building the X Window System Consolidation for" \
"${DISTRO_NAME:-OpenSolaris}.\n" if [
"${MAKE_PKGS}" =
1 ] ;
then print -n
"Build finish time: " ;
date ;
print "" if [[
"${USE_PARFAIT}" ==
"yes" ]] ;
then print -n
"\nParfait issues: " print -n
"\ncheck-rtime errors: " print -n
"\nFinish time: " ;
date perl -e
'$runtime = time - $ARGV[0]; printf("Runtime: %d:%02d\n", $runtime/3600, ($runtime%3600)/60); ' \