summaryrefslogtreecommitdiff
path: root/mk/emulator
diff options
context:
space:
mode:
authorjlam <jlam>2007-08-23 13:43:57 +0000
committerjlam <jlam>2007-08-23 13:43:57 +0000
commit8ad25efe1ed06b85e304bd9b21e83a6b791b6212 (patch)
tree73887b63d44b67ec3b64e2474d54cf1eba24f692 /mk/emulator
parenteee67483560cc3e6443fe96b36f1b3a5074bc247 (diff)
downloadpkgsrc-8ad25efe1ed06b85e304bd9b21e83a6b791b6212.tar.gz
Define a variable EMUL_IS_NATIVE if the emulated operating system
matches the native operating system. Use it in place of checking whether EMUL_DISTRO matches "native-*" as EMUL_DISTRO is no longer defined after bsd.prefs.mk is included. This should fix PR pkg/36823 by Robert Elz.
Diffstat (limited to 'mk/emulator')
-rw-r--r--mk/emulator/emulator-vars.mk10
1 files changed, 9 insertions, 1 deletions
diff --git a/mk/emulator/emulator-vars.mk b/mk/emulator/emulator-vars.mk
index f799cfc3091..c59190f2193 100644
--- a/mk/emulator/emulator-vars.mk
+++ b/mk/emulator/emulator-vars.mk
@@ -1,4 +1,4 @@
-# $NetBSD: emulator-vars.mk,v 1.6 2007/08/22 14:47:10 jlam Exp $
+# $NetBSD: emulator-vars.mk,v 1.7 2007/08/23 13:43:57 jlam Exp $
#
# This file is included by bsd.prefs.mk only if EMUL_PLATFORMS is defined
# and non-empty.
@@ -42,6 +42,10 @@
# package isn't supported on this machine, then its value is
# "none".
#
+# EMUL_IS_NATIVE
+# Whether or not the operating system being emulated matches the
+# native operating system. It is either defined or undefined.
+#
# _EMUL_OPSYS
# A table that maps ${OPSYS} to the operating system names
@@ -112,3 +116,7 @@ EMUL_OPSYS?= none
EMUL_ARCH?= ${EMUL_PLATFORM:C/.*-//}
EMUL_OPSYS?= ${EMUL_PLATFORM:C/-.*//}
.endif
+
+.if ${_EMUL_OPSYS} == ${EMUL_OPSYS}
+EMUL_IS_NATIVE= defined
+.endif