buildit revision 648
73cd9876e07c696a3e3563277a1d4e3173861af6stoddard# Script for building OpenSolaris X Consolidation
73cd9876e07c696a3e3563277a1d4e3173861af6stoddard###########################################################################
f0484231f96a9d95f5044c1c8cb33b322d6f9bcbdougm# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
2281907b9a2a509aa0eabdc0b1d21424018dbbdfrbb# Permission is hereby granted, free of charge, to any person obtaining a
2281907b9a2a509aa0eabdc0b1d21424018dbbdfrbb# copy of this software and associated documentation files (the
2281907b9a2a509aa0eabdc0b1d21424018dbbdfrbb# "Software"), to deal in the Software without restriction, including
2281907b9a2a509aa0eabdc0b1d21424018dbbdfrbb# without limitation the rights to use, copy, modify, merge, publish,
2281907b9a2a509aa0eabdc0b1d21424018dbbdfrbb# distribute, and/or sell copies of the Software, and to permit persons
2281907b9a2a509aa0eabdc0b1d21424018dbbdfrbb# to whom the Software is furnished to do so, provided that the above
2281907b9a2a509aa0eabdc0b1d21424018dbbdfrbb# copyright notice(s) and this permission notice appear in all copies of
2ca377182c951f9895cd5e7a350b442a39c8eb23rbb# the Software and that both the above copyright notice(s) and this
2ca377182c951f9895cd5e7a350b442a39c8eb23rbb# permission notice appear in supporting documentation.
1217c8c05f7e3ac0cac8c8dc0c6e7979326c977arbb# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1217c8c05f7e3ac0cac8c8dc0c6e7979326c977arbb# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1217c8c05f7e3ac0cac8c8dc0c6e7979326c977arbb# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
1217c8c05f7e3ac0cac8c8dc0c6e7979326c977arbb# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
b6873e2c00ff7b0af18d837ef4c3cd58cf6b54c5rbb# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
893328ef6ff86d0ca27774778d84410353789fb0fielding# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
893328ef6ff86d0ca27774778d84410353789fb0fielding# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
893328ef6ff86d0ca27774778d84410353789fb0fielding# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
893328ef6ff86d0ca27774778d84410353789fb0fielding# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
274de94b0b59f4ee126dca1726624980828d0cd0stoddard# Except as contained in this notice, the name of a copyright holder
274de94b0b59f4ee126dca1726624980828d0cd0stoddard# shall not be used in advertising or otherwise to promote the sale, use
274de94b0b59f4ee126dca1726624980828d0cd0stoddard# or other dealings in this Software without prior written authorization
274de94b0b59f4ee126dca1726624980828d0cd0stoddard# of the copyright holder.
85d733e70c94a57c9ff893ed05d8b9cfcd0f083fstoddard###########################################################################
962f339c5f0f61adde79936f610fb05ce0854d6echuck# ident "@(#)buildit 1.7 09/02/26 SMI"
3f0dd56fa6b79fe389f20738369b290e2f3e9201trawickset -- `getopt p $*`
70b83609159f247f5920421a890dc27a0718d63adreidif [ $? != 0 ]
a1033a770bfee276def7d4cb9759856f69293e48trawickfor i in $* ; do
adb8ad10ffc20ed06ec6cfab6cd7933ab429ea7dtrawick# Add /usr/bin to front of path in case user has /usr/gnu/bin default
adb8ad10ffc20ed06ec6cfab6cd7933ab429ea7dtrawick# Add /usr/sbin to path for dtrace
adb8ad10ffc20ed06ec6cfab6cd7933ab429ea7dtrawick# Add /usr/X11/bin to path for makedepend
b45c1c292ff1fa635004ae81fa691f8cb3cdda85rbb# Send all further output & errors to the log file
86f191e8221867df8c9cd22271e7d54204f39186rbbecho "------------------------------------------------------------------------------"
86f191e8221867df8c9cd22271e7d54204f39186rbbecho "Start time: "
962f339c5f0f61adde79936f610fb05ce0854d6echuckecho "Building on: "
157e6980a24a44e4719173b1c555133caecbc172stoddardecho "Using these compilers: "
157e6980a24a44e4719173b1c555133caecbc172stoddard# Make sure Sun C compiler is at least version 5.9 (Studio 12)
157e6980a24a44e4719173b1c555133caecbc172stoddardcc -V 2>&1 | perl -n -e 'if (($_ =~ m| C (\d)+.(\d)+|)) { \
faa6e5d8b210456ae4dad0398dfa40a19fd89d59coar print $_ ; print "*** Compiler too old!\n" if ( ($1 != 5) || ($2 < 9) ) }'
171f8c636ff1374e3a3dfff333211becda355b98trawickecho "Using these environment variables: "
171f8c636ff1374e3a3dfff333211becda355b98trawickecho "------------------------------------------------------------------------------"
bae64a3e5bf7b96d8379e24f13273f26b3b29e16coarecho "\nFinished building the X Window System Consolidation for OpenSolaris.\n"
bae64a3e5bf7b96d8379e24f13273f26b3b29e16coarecho "Finish time: "
c7fe488773cf6f50a1b2d9211c2f30a2ace8b67ccoarperl -e '$runtime=time-$ARGV[0];printf("Runtime: %d:%02d\n", $runtime/3600, ($runtime%3600)/60); ' $START