# ========== Copyright Header Begin ==========================================
# OpenSPARC T1 Processor File: makeinfo
# Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
# The above named program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
# License version 2 as published by the Free Software Foundation.
# The above named program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
# You should have received a copy of the GNU General Public
# License along with this work; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
# ========== Copyright Header End ============================================
#####################################################################
## Description : .gnu_tool_wrapper
#######################################################################
echo "$tool-> $message Exiting ..."
############################ main ##############################
GNU_ROOT
=/freetools
/local
GNU_TOOL2PKG
=${GNU_TOOL2PKG:=$GNU_ROOT/.tool2pkg}
### Get GNU package name from the "tool2pkg" file
pkg
=`/bin/awk '{if($1 == var)print $2}' var=$tool $GNU_TOOL2PKG`
die
"gnu package not found!"
version
=`configsrch $tool 2> /dev/null`
#die "gnusrch returned error code: $version"
version
=`echo $version |/bin/awk '{print $1}'`
if [ -z "$version" ] ; then
die
"No version set for $tool in $pkg."
exe
=$GNU_ROOT/$pkg/$version/bin
/$tool
elif [ $version -eq latest
] ; then
die
"gnusrch returned error code: $gnusrch_version"
die
"Executable $exe not found!"