[vlc-commits] contrib: bootstrap: Simplify macOS sdk detection
David Fuhrmann
git at videolan.org
Thu May 31 01:19:47 CEST 2018
vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Thu May 31 01:12:22 2018 +0200| [cddeb563f53168ac859d1b32e08e8212dc93a50c] | committer: David Fuhrmann
contrib: bootstrap: Simplify macOS sdk detection
Just use xcrun --show-sdk-path to get the default SDK patch.
This also finds all other variants checked by the other tests.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cddeb563f53168ac859d1b32e08e8212dc93a50c
---
contrib/bootstrap | 23 ++++-------------------
1 file changed, 4 insertions(+), 19 deletions(-)
diff --git a/contrib/bootstrap b/contrib/bootstrap
index 99f478f2b9..5d1ea36095 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -223,28 +223,13 @@ check_macosx_sdk()
OSX_VERSION=`xcrun --show-sdk-version`
echo "OSX_VERSION not specified, assuming $OSX_VERSION"
fi
- if test -z "$SDKROOT"
- then
- SDKROOT=`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk
+ if [ -z "$SDKROOT" ]; then
+ SDKROOT=$(xcrun --show-sdk-path)
echo "SDKROOT not specified, assuming $SDKROOT"
fi
- if [ ! -d "${SDKROOT}" ]
- then
- SDKROOT_NOT_FOUND=`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk
- SDKROOT=`xcode-select -print-path`/SDKs/MacOSX$OSX_VERSION.sdk
- echo "SDKROOT not found at $SDKROOT_NOT_FOUND, trying $SDKROOT"
- fi
- if [ ! -d "${SDKROOT}" ]
- then
- SDKROOT_NOT_FOUND="$SDKROOT"
- SDKROOT=`xcrun --show-sdk-path`
- echo "SDKROOT not found at $SDKROOT_NOT_FOUND, trying $SDKROOT"
- fi
-
- if [ ! -d "${SDKROOT}" ]
- then
- echo "*** ${SDKROOT} does not exist, please install required SDK, or set SDKROOT manually. ***"
+ if [ ! -d "$SDKROOT" ]; then
+ echo "*** $SDKROOT does not exist, please install required SDK, or set SDKROOT manually. ***"
exit 1
fi
More information about the vlc-commits
mailing list