If an SDK matching our OS X version isn't found -- for instance, because

OS X has been upgraded and Xcode hasn't been -- try again without
specifying the version. This (1) works better and (2) gives a better
error message when it doesn't. From Markus Mayer in PR pkg/50317.
This commit is contained in:
schmonz 2018-11-07 16:50:27 +00:00
parent ae220b8117
commit 47ae48e310

View file

@ -1,4 +1,4 @@
# $NetBSD: Darwin.mk,v 1.88 2017/10/10 13:57:23 jperkin Exp $
# $NetBSD: Darwin.mk,v 1.89 2018/11/07 16:50:27 schmonz Exp $
#
# Variable definitions for the Darwin operating system.
@ -101,6 +101,9 @@ _OPSYS_INCLUDE_DIRS?= /usr/include
.elif exists(/usr/bin/xcrun)
. if !defined(OSX_SDK_PATH)
OSX_SDK_PATH!= /usr/bin/xcrun --sdk macosx${OSX_VERSION} --show-sdk-path 2>/dev/null || echo /nonexistent
. if ${OSX_SDK_PATH} == "/nonexistent"
OSX_SDK_PATH!= /usr/bin/xcrun --sdk macosx --show-sdk-path 2>/dev/null || echo /nonexistent
. endif
MAKEFLAGS+= OSX_SDK_PATH=${OSX_SDK_PATH:Q}
. endif
. if exists(${OSX_SDK_PATH}/usr/include/stdio.h)