From 3c727f41e07aa6bf4b5855ae7b327e02b53a586e Mon Sep 17 00:00:00 2001 From: jperkin Date: Mon, 2 Jul 2012 15:49:41 +0000 Subject: Introduce OS_VARIANT. This variable can be used to differentiate operating systems which share the same base system but offer contrasting environments, for example the various illumos forks which all identify as "SunOS 5.11". Detect SmartOS and set OS_VARIANT accordingly. --- mk/bsd.prefs.mk | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mk') diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk index 4efd4aa4b25..b0794b2e444 100644 --- a/mk/bsd.prefs.mk +++ b/mk/bsd.prefs.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prefs.mk,v 1.323 2012/06/14 21:57:37 jperkin Exp $ +# $NetBSD: bsd.prefs.mk,v 1.324 2012/07/02 15:49:41 jperkin Exp $ # # This file includes the mk.conf file, which contains the user settings. # @@ -74,6 +74,11 @@ OPSYS:= ${:!${UNAME} -s!:S/-//g:S/\///g} MAKEFLAGS+= OPSYS=${OPSYS:Q} .endif +# OS_VARIANT is used to differentiate operating systems which have a common +# basis but offer contrasting environments, for example Linux distributions +# or illumos forks. +OS_VARIANT?= # empty + # The _CMD indirection allows code below to modify these values # without executing the commands at all. Later, recursed make # invocations will skip these blocks entirely thanks to MAKEFLAGS. @@ -275,6 +280,10 @@ MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} LOWER_VENDOR?= sun LOWER_OPSYS?= solaris LOWER_OPSYS_VERSUFFIX= 2.${OS_VERSION:C/5.//} +_UNAME_V!= ${UNAME} -v +. if !empty(_UNAME_V:Mjoyent_*) +OS_VARIANT= SmartOS +. endif .elif !defined(LOWER_OPSYS) LOWER_OPSYS:= ${OPSYS:tl} -- cgit v1.2.3