Mac OS X: removing the revision number from 10.7

This commit is contained in:
Martin Beaudoin 2013-07-04 22:08:36 -04:00
parent 84b4a7e696
commit 779fcf8a8f
2 changed files with 8 additions and 4 deletions

View file

@ -245,7 +245,9 @@ Darwin)
esac
# Make sure that binaries use the best features of the used OS-Version
export MACOSX_DEPLOYMENT_TARGET=`sw_vers -productVersion`
# We need to get rid of the revision number from this string. eg turn "10.7.5" into "10.7"
v=( ${MACOSX_DEPLOYMENT_TARGET//./ } )
export MACOSX_DEPLOYMENT_TARGET="${v[0]}.${v[1]}"
if [ "$compilerInstall" == "System" ]
then

View file

@ -242,7 +242,9 @@ case Darwin:
endsw
# Make sure that binaries use the best features of the used OS-Version
setenv MACOSX_DEPLOYMENT_TARGET `sw_vers -productVersion`
# We need to get rid of the revision number from this string. eg turn "10.7.5" into "10.7"
set v=`sw_vers -productVersion | sed 's/\./ /g'`
setenv MACOSX_DEPLOYMENT_TARGET "$v[1].$v[2]"
# Use Mac-Ports-Compiler instead of Apple-gcc-4.2
if ( ! $?compilerInstall ) setenv compilerInstall System