summaryrefslogtreecommitdiff
path: root/makefiles/gmake/guess_env
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2009-03-13 12:33:21 +0100
committerAndreas Baumann <abaumann@yahoo.com>2009-03-13 12:33:21 +0100
commit805e712bf04f55a6fb1c27d40d7917fa7f6ac43f (patch)
tree2aedd7bc3466924e0ed2ea52d2a780523c6b1f87 /makefiles/gmake/guess_env
parent174f62bcf9707dfa26cf6d2dc0888198c36428d4 (diff)
downloadwolfbones-805e712bf04f55a6fb1c27d40d7917fa7f6ac43f.tar.gz
wolfbones-805e712bf04f55a6fb1c27d40d7917fa7f6ac43f.tar.bz2
added pcc support
Diffstat (limited to 'makefiles/gmake/guess_env')
-rwxr-xr-xmakefiles/gmake/guess_env25
1 files changed, 23 insertions, 2 deletions
diff --git a/makefiles/gmake/guess_env b/makefiles/gmake/guess_env
index 3a7fdf6..b494513 100755
--- a/makefiles/gmake/guess_env
+++ b/makefiles/gmake/guess_env
@@ -81,7 +81,12 @@ else
if test $? = 0; then
COMPILER='spro'
else
- COMPILER='unknown'
+ ( $CC -v | head -n 1 | grep 'pcc' ) >/dev/null
+ if test $? = 0; then
+ COMPILER='pcc'
+ else
+ COMPILER='unknown'
+ fi
fi
fi
fi
@@ -113,11 +118,19 @@ fi
# version of spro (Sun Pro compiler, Sun Studio)
-if test $COMPILER = 'spro'; then
+if test $COMPILER = "spro"; then
SPRO_VERSION=`$CC -xhelp=readme | head -n 1 | cut -d ' ' -f 3`
SPRO_MAJOR_VERSION=`echo $SPRO_VERSION | cut -d : -f 1`
fi
+# version of pcc (Portable C Compiler)
+
+if test $COMPILER = "pcc"; then
+ PCC_VERSION=`$CC -v | head -n 1 | cut -d ' ' -f 2`
+ PCC_MAJOR_VERSION=`echo $PCC_VERSION | cut -d . -f 1`
+ PCC_MINOR_VERSION=`echo $PCC_VERSION | cut -d . -f 2`
+fi
+
case "$1" in
--platform) echo $PLATFORM
;;
@@ -154,6 +167,12 @@ case "$1" in
--spro-major-version) echo $SPRO_MAJOR_VERSION
;;
+
+ --pcc-major-version) echo $PCC_MAJOR_VERSION
+ ;;
+
+ --pcc-minor-version) echo $PCC_MINOR_VERSION
+ ;;
esac
MAKEFILE_DIR="$3/$4"
@@ -173,5 +192,7 @@ TCC_MINOR_VERSION=$TCC_MINOR_VERSION
ICC_MAJOR_VERSION=$ICC_MAJOR_VERSION
ICC_MINOR_VERSION=$ICC_MINOR_VERSION
SPRO_MAJOR_VERSION=$SPRO_MAJOR_VERSION
+PCC_MAJOR_VERSION=$PCC_MAJOR_VERSION
+PCC_MINOR_VERSION=$PCC_MINOR_VERSION
EOF
fi