buildit revision 905
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# Script for building OpenSolaris X Consolidation
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews###########################################################################
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# Use is subject to license terms.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# Permission is hereby granted, free of charge, to any person obtaining a
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# copy of this software and associated documentation files (the
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# "Software"), to deal in the Software without restriction, including
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# without limitation the rights to use, copy, modify, merge, publish,
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# distribute, and/or sell copies of the Software, and to permit persons
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# to whom the Software is furnished to do so, provided that the above
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# copyright notice(s) and this permission notice appear in all copies of
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# the Software and that both the above copyright notice(s) and this
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# permission notice appear in supporting documentation.
b5ad6dfea4cc3e7d1d322ac99f1e5a31096837c4Mark Andrews# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1753d3c4d74241a847794f7e7cfd94cc79be6600Evan Hunt# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# Except as contained in this notice, the name of a copyright holder
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# shall not be used in advertising or otherwise to promote the sale, use
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# or other dealings in this Software without prior written authorization
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# of the copyright holder.
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington###########################################################################
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# ident "@(#)buildit 1.10 09/10/27 SMI"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinfor i in $* ; do
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Add /usr/bin to front of path in case user has /usr/gnu/bin default
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Add /usr/sbin to path for dtrace
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Add /usr/X11/bin to path for makedepend
0b062f4990db5cc6db2fe3398926f71b92a67407Brian WellingtonPATH=/usr/bin:${PATH}:/usr/sbin:/usr/X11/bin
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt# Send all further output & errors to the log file
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellingtonecho "------------------------------------------------------------------------------"
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Huntecho "Start time: "
b843f577bbcd6660fbaa506d9e55b156c689a5a8Evan Huntecho "Building on: "
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellingtonecho "Using these compilers: "
c6f4972c745f8903aba6dcca41f17a44c473db66Mark Andrews# Make sure Sun C compiler is at least version 5.9 (Studio 12)
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Huntcc -V 2>&1 | perl -n -e 'if (($_ =~ m| C (\d+).(\d+)|)) { \
61bcc232038f0a2cb77ed6269675fdc288f5ec98Evan Hunt print $_ ; print "*** Compiler too old!\n" if ( ($1 != 5) || ($2 < 9) ) }'
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# Exported to stop Sun compilers from reporting home on each usage
c6f4972c745f8903aba6dcca41f17a44c473db66Mark Andrewsecho "Using these environment variables: "
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellingtonecho "------------------------------------------------------------------------------"
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Huntchmod +x open-src/common/install-sh open-src/common/delibtoolize.pl
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington# Run as two steps to avoid race between cleaning & rebuilding
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellingtonecho "\nFinished building the X Window System Consolidation for OpenSolaris.\n"
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellingtonecho "Finish time: "
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellingtonperl -e '$runtime=time-$ARGV[0]; printf("Runtime: %d:%02d\n", $runtime/3600, ($runtime%3600)/60); ' "${START}"