diff options
author | Carl Dong <contact@carldong.me> | 2020-12-10 13:50:16 -0500 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2021-01-21 10:58:12 -0500 |
commit | 8dbf18cb1d3260d34ba822ceb12e67b1f124ea13 (patch) | |
tree | 848236e37bae56cc6669364c68e1de1849537702 /contrib | |
parent | 34b23f597ec52efb795d72e9e5620712d0010edd (diff) |
guix: Check for macOS SDK before building anything
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/guix/guix-build.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/contrib/guix/guix-build.sh b/contrib/guix/guix-build.sh index 18b69f0d82..e94cb02b5d 100755 --- a/contrib/guix/guix-build.sh +++ b/contrib/guix/guix-build.sh @@ -110,6 +110,24 @@ else mkdir -p "$DISTSRC_BASE" fi +################ +# Check 5: When building for darwin, make sure that the macOS SDK exists +################ + +for host in $HOSTS; do + case "$host" in + *darwin*) + OSX_SDK="$(make -C "${PWD}/depends" --no-print-directory HOST="$host" print-OSX_SDK | sed 's@^[^=]\+=[[:space:]]\+@@g')" + if [ -e "$OSX_SDK" ]; then + echo "Found macOS SDK at '${OSX_SDK}', using..." + else + echo "macOS SDK does not exist at '${OSX_SDK}', please place the extracted, untarred SDK there to perform darwin builds, exiting..." + exit 1 + fi + ;; + esac +done + ######### # Setup # ######### |