#
# buildit
# Script for building Solaris X Consolidation
#
###########################################################################
#
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
###########################################################################
#
#
export PATH
# Ensure mkdir sets expected permissions for directories in proto area
umask 022
progname="$0"
function fatal_error
{
print -u2 "${progname}: ERROR: $*"
exit 1
}
case $i in
p) MAKE_PKGS=1 ;;
s) MAKE_SRC_RELEASE=1 ;;
v) VERBOSE_FLAGS="-v" ;;
P) PUBLISHER_FLAGS="-p $OPTARG" ;;
esac
done
if [[ $? != 0 ]] ; then
print -u2 "USAGE: $0 [-p [-P publisher]] [-v]"
exit 2
fi
# Send all further output & errors to the log file
# Extract variables from makefiles via make and set them in the shell
typeset -n var=$1
}
# Find hg id and export it so set-elf-comments.pl doesn't have to re-run
# for every module built
*) print "${tag}" ;;
esac
}
print "------------------------------------------------------------------------------"
print "Building gate at hg id: ${XBUILD_HG_ID}"
print -n "Start time: " ; date
print -n "Building on: " ; uname -a
print "Using these tools: "
# Make sure Studio C compiler is at least version 5.13 (Studio 12.4)
# or else the kernel builds will fail
whence cc
print $_ ; ( ($1 != 5) || ($2 < 13) ) ? exit(1) : exit(0) }' \
|| fatal_error '*** Studio Compiler is too old! Studio 12.4 is required.'
# Log paths & versions of tools which use gnu standard --version flag
done
# Exported to stop Studio compilers from reporting home on each usage
export SUNW_NO_UPDATE_NOTIFY='true'
export UT_NO_USAGE_TRACKING='1'
print "Using these environment variables: "
print "------------------------------------------------------------------------------"
# Clean new proto areas for this architecture
# Generate source release while tree is in clean state, but ensure we have all
if [ "${MAKE_SRC_RELEASE}" = 1 ] ; then
done
fi
cd ..
if [[ "${USE_PARFAIT}" == "yes" ]] ; then
-j "${DMAKE_MAX_JOBS:-100%}" -r "${XBUILD_HG_ID}" \
fi
# Set DISTRO_NAME based on open-src/common/Makefile.options
print "\nFinished building the X Window System Consolidation for" \
"${DISTRO_NAME:-OpenSolaris}.\n"
if [ "${MAKE_PKGS}" = 1 ] ; then
fi
wait
if [[ "${USE_PARFAIT}" == "yes" ]] ; then
print -n "\nParfait issues: "
print "Parfait results:"
fi
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); ' \
"${START}"