buildit revision 98
724365f7556fc4201fdb11766ebc6bd918523130sethg# Script for building OpenSolaris X Consolidation
724365f7556fc4201fdb11766ebc6bd918523130sethg###########################################################################
724365f7556fc4201fdb11766ebc6bd918523130sethg# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
724365f7556fc4201fdb11766ebc6bd918523130sethg# Permission is hereby granted, free of charge, to any person obtaining a
724365f7556fc4201fdb11766ebc6bd918523130sethg# copy of this software and associated documentation files (the
724365f7556fc4201fdb11766ebc6bd918523130sethg# "Software"), to deal in the Software without restriction, including
724365f7556fc4201fdb11766ebc6bd918523130sethg# without limitation the rights to use, copy, modify, merge, publish,
724365f7556fc4201fdb11766ebc6bd918523130sethg# distribute, and/or sell copies of the Software, and to permit persons
724365f7556fc4201fdb11766ebc6bd918523130sethg# to whom the Software is furnished to do so, provided that the above
724365f7556fc4201fdb11766ebc6bd918523130sethg# copyright notice(s) and this permission notice appear in all copies of
724365f7556fc4201fdb11766ebc6bd918523130sethg# the Software and that both the above copyright notice(s) and this
724365f7556fc4201fdb11766ebc6bd918523130sethg# permission notice appear in supporting documentation.
724365f7556fc4201fdb11766ebc6bd918523130sethg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
724365f7556fc4201fdb11766ebc6bd918523130sethg# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
724365f7556fc4201fdb11766ebc6bd918523130sethg# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
724365f7556fc4201fdb11766ebc6bd918523130sethg# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
724365f7556fc4201fdb11766ebc6bd918523130sethg# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
724365f7556fc4201fdb11766ebc6bd918523130sethg# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
724365f7556fc4201fdb11766ebc6bd918523130sethg# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
724365f7556fc4201fdb11766ebc6bd918523130sethg# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
724365f7556fc4201fdb11766ebc6bd918523130sethg# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
724365f7556fc4201fdb11766ebc6bd918523130sethg# Except as contained in this notice, the name of a copyright holder
724365f7556fc4201fdb11766ebc6bd918523130sethg# shall not be used in advertising or otherwise to promote the sale, use
724365f7556fc4201fdb11766ebc6bd918523130sethg# or other dealings in this Software without prior written authorization
724365f7556fc4201fdb11766ebc6bd918523130sethg# of the copyright holder.
724365f7556fc4201fdb11766ebc6bd918523130sethg###########################################################################
724365f7556fc4201fdb11766ebc6bd918523130sethg# ident "@(#)buildit 1.2 07/01/31 SMI"
724365f7556fc4201fdb11766ebc6bd918523130sethgif [ $? != 0 ]
724365f7556fc4201fdb11766ebc6bd918523130sethgfor i in $* ; do
724365f7556fc4201fdb11766ebc6bd918523130sethg# Add /usr/sfw/bin & /opt/sfw/bin to path for GNU tools for external modules
724365f7556fc4201fdb11766ebc6bd918523130sethg# Append all further output & errors to the log file
724365f7556fc4201fdb11766ebc6bd918523130sethgecho "------------------------------------------------------------------------------"
724365f7556fc4201fdb11766ebc6bd918523130sethgecho "Start time: "
724365f7556fc4201fdb11766ebc6bd918523130sethgecho "Building on: "
9e1c849eae563842996c64c805047e840c75fc79David Zhang - Sun Microsystems - Beijing Chinaecho "Using this compiler: "
9e1c849eae563842996c64c805047e840c75fc79David Zhang - Sun Microsystems - Beijing ChinaMACH=`uname -p`
9e1c849eae563842996c64c805047e840c75fc79David Zhang - Sun Microsystems - Beijing Chinaif [ "$MACH" = "i386" ]; then
9e1c849eae563842996c64c805047e840c75fc79David Zhang - Sun Microsystems - Beijing China /bin/rm -rf proto-i386-svr4
9e1c849eae563842996c64c805047e840c75fc79David Zhang - Sun Microsystems - Beijing China /bin/rm -rf proto-sun4-svr4
9e1c849eae563842996c64c805047e840c75fc79David Zhang - Sun Microsystems - Beijing Chinamake -k clean install
9e1c849eae563842996c64c805047e840c75fc79David Zhang - Sun Microsystems - Beijing Chinaif [ $MAKE_PKGS = 1 ] ; then
9e1c849eae563842996c64c805047e840c75fc79David Zhang - Sun Microsystems - Beijing China PACKAGE_LIST=`cd packages && echo SUNW*`
9e1c849eae563842996c64c805047e840c75fc79David Zhang - Sun Microsystems - Beijing China export PACKAGE_LIST
9e1c849eae563842996c64c805047e840c75fc79David Zhang - Sun Microsystems - Beijing China chmod +x make_release_packages
9e1c849eae563842996c64c805047e840c75fc79David Zhang - Sun Microsystems - Beijing China mkdir packages/common_files
9e1c849eae563842996c64c805047e840c75fc79David Zhang - Sun Microsystems - Beijing China ./make_release_packages
9e1c849eae563842996c64c805047e840c75fc79David Zhang - Sun Microsystems - Beijing Chinaecho "\nFinished building the X Window System Consolidation for OpenSolaris.\n"
9e1c849eae563842996c64c805047e840c75fc79David Zhang - Sun Microsystems - Beijing Chinaecho "Finish time: "
9e1c849eae563842996c64c805047e840c75fc79David Zhang - Sun Microsystems - Beijing Chinaperl -e '$runtime=time-$ARGV[0];printf("Runtime: %d:%02d\n", $runtime/3600, ($runtime%3600)/60); ' $START