summaryrefslogtreecommitdiff
path: root/mk/platform
diff options
context:
space:
mode:
authorjperkin <jperkin>2016-02-22 19:57:41 +0000
committerjperkin <jperkin>2016-02-22 19:57:41 +0000
commit1f200638fb03a0a10f86d7c34b16426e318323d8 (patch)
treeb029a98e06b2481557ef6237582772c15ea662c4 /mk/platform
parent9bb254702f3d9eec98ec3c02b7f04b20f99b4bed (diff)
downloadpkgsrc-1f200638fb03a0a10f86d7c34b16426e318323d8.tar.gz
Export OSX_VERSION (renamed from OSX_VERS) to the environment regardless of
whether we're using the SDK path or /usr/include, as it is useful for other contexts than simply determining the SDK directory.
Diffstat (limited to 'mk/platform')
-rw-r--r--mk/platform/Darwin.mk19
1 files changed, 10 insertions, 9 deletions
diff --git a/mk/platform/Darwin.mk b/mk/platform/Darwin.mk
index 040bfb77146..1f65c68d854 100644
--- a/mk/platform/Darwin.mk
+++ b/mk/platform/Darwin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: Darwin.mk,v 1.76 2015/12/14 14:14:33 jperkin Exp $
+# $NetBSD: Darwin.mk,v 1.77 2016/02/22 19:57:41 jperkin Exp $
#
# Variable definitions for the Darwin operating system.
@@ -77,8 +77,14 @@ _USER_DEPENDS= user-darwin>=20130712:../../sysutils/user_darwin
_OPSYS_EMULDIR.darwin= # empty
-_OPSYS_SYSTEM_RPATH?= /usr/lib
-_OPSYS_LIB_DIRS?= /usr/lib
+_OPSYS_SYSTEM_RPATH?= /usr/lib
+_OPSYS_LIB_DIRS?= /usr/lib
+
+OSX_VERSION!= sw_vers -productVersion
+. if ${OSX_VERSION:R:R} != ${OSX_VERSION:R}
+OSX_VERSION:= ${OSX_VERSION:R}
+. endif
+MAKEFLAGS+= OSX_VERSION=${OSX_VERSION:Q}
#
# From Xcode 5 onwards system headers are no longer installed by default
@@ -90,14 +96,9 @@ _OPSYS_LIB_DIRS?= /usr/lib
.if exists(/usr/include/stdio.h)
_OPSYS_INCLUDE_DIRS?= /usr/include
.elif exists(/usr/bin/xcrun)
-OSX_VERS!= sw_vers -productVersion
-. if ${OSX_VERS:R:R} != ${OSX_VERS:R}
-OSX_VERS:= ${OSX_VERS:R}
-. endif
-OSX_SDK_PATH!= /usr/bin/xcrun --sdk macosx${OSX_VERS} --show-sdk-path 2>/dev/null || echo /nonexistent
+OSX_SDK_PATH!= /usr/bin/xcrun --sdk macosx${OSX_VERSION} --show-sdk-path 2>/dev/null || echo /nonexistent
. if exists(${OSX_SDK_PATH}/usr/include/stdio.h)
_OPSYS_INCLUDE_DIRS?= ${OSX_SDK_PATH}/usr/include
-MAKEFLAGS+= OSX_VERS=${OSX_VERS:Q}
MAKEFLAGS+= OSX_SDK_PATH=${OSX_SDK_PATH:Q}
. else
PKG_FAIL_REASON+= "No suitable Xcode SDK or Command Line Tools installed."