If mipspro!=0 then automatically determine if cc -version will work.

This avoids lots of if/then in the build.sh scripts.
This commit is contained in:
Tom G. Christensen 2008-01-19 10:48:04 +00:00
parent a145b275a6
commit 18e4478dd4

View File

@ -89,8 +89,7 @@ ignore_deps=""
# Should be 1 for Irix 5.3 # Should be 1 for Irix 5.3
deps_resolve_symlinks=0 deps_resolve_symlinks=0
# If using MIPSPro 7.x please set this to 1 # If not using gcc then please set this to 1½
# If using Irix 5.3 IDO please set this to 2
mipspro=0 mipspro=0
# Comment these declarations to get it to run with ksh # Comment these declarations to get it to run with ksh
@ -1038,22 +1037,16 @@ auto_rel()
# Remove trailing whitespace and \n # Remove trailing whitespace and \n
local fullcf="${temp_fullcf%\\*}" local fullcf="${temp_fullcf%\\*}"
# end # end
case $mipspro in if [ $mipspro -eq 0 ]; then
0) local compiler_temp="$(gcc --version 2>&1 | $SED -n '1,1p')"
local compiler_temp="$(gcc --version 2>&1 | $SED -n '1,1p')" local compiler="gcc ${compiler_temp##* }"
local compiler="gcc ${compiler_temp##* }" else # not gcc
;; if [ "$_os" = "irix53" ]; then
1)
local compiler="$(cc -version 2>&1)"
;;
2)
local compiler="Irix 5.3 IDO" local compiler="Irix 5.3 IDO"
;; else
*) local compiler="$(cc -version 2>&1)"
echo "Unknown compiler: mipspro=$mipspro" fi
exit 1 fi
;;
esac
local pkgnam_temp=$($GREP 'pkgname=' $metadir/pkgdef) local pkgnam_temp=$($GREP 'pkgname=' $metadir/pkgdef)
local pkgnam=$(_upls ${pkgnam_temp#pkgname=*}) local pkgnam=$(_upls ${pkgnam_temp#pkgname=*})
local vendor_temp=$($GREP 'pkgvendor=' $metadir/pkgdef) local vendor_temp=$($GREP 'pkgvendor=' $metadir/pkgdef)