This repository has been archived by the owner. It is now read-only.

smlnj: Fix for Xcode >= 4.3 #12143

Closed
wants to merge 2 commits into
from
Jump to file or symbol
Failed to load files and symbols.
+9 −3
Split
View
@@ -69,14 +69,20 @@ def caveats
index ea5f8c3..0108774 100755
--- a/install.sh
+++ b/install.sh
-@@ -290,6 +290,11 @@ case $ARCH in
+@@ -290,6 +290,17 @@ case $ARCH in
esac
case $OPSYS in
+ darwin)
++ # find the SDK directory
@samueljohn

samueljohn Jun 30, 2012

Contributor

Finding the SDK is now handled by MacOS.sdk_path. It's smart enough to deal with different installation schemes.
I recommend to use MacOS.sdk_path.to_s because in cases where no Xcode is present but the "Command Line Tools for Xcode" are, this returns nil and the .to_s an empty string in turn. And that's alright, since the sdk is basically located in /usr in that case.

++ SDKDIR=/Developer/SDKs
++ [ -d $SDKDIR ] || SDKDIR=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
++ [ -d $SDKDIR ] || SDKDIR=
+ # finding the correct SDK
-+ SDKVERSION=`/usr/bin/sw_vers -productVersion | grep -o ^[0-9][0-9]\.[0-9]`
-+ EXTRA_DEFS="SDK=-isysroot /Developer/SDKs/MacOSX$SDKVERSION.sdk -mmacosx-version-min=$SDKVERSION"
++ if [ "$SDKDIR" ]; then
++ SDKVERSION=`/usr/bin/sw_vers -productVersion | grep -o ^[0-9][0-9]\.[0-9]`
++ EXTRA_DEFS="SDK=-isysroot ${SDKDIR}/MacOSX${SDKVERSION}.sdk -mmacosx-version-min=$SDKVERSION"
@samueljohn

samueljohn Jun 30, 2012

Contributor

can we overwrite the EXTRA_DEFS from the command line without a patch?

++ fi
+ ;;
solaris)
MAKE=/usr/ccs/bin/make