From 1f200638fb03a0a10f86d7c34b16426e318323d8 Mon Sep 17 00:00:00 2001 From: jperkin Date: Mon, 22 Feb 2016 19:57:41 +0000 Subject: 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. --- mk/platform/Darwin.mk | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'mk/platform') 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." -- cgit v1.2.3