summaryrefslogtreecommitdiff
path: root/mk/emulator/emulator-opsys.mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2007-08-23 15:59:33 +0000
committerjlam <jlam@pkgsrc.org>2007-08-23 15:59:33 +0000
commite44e2c60b8c08c7926831a152cd9fbaf85c8e60f (patch)
tree39d6f1c0868fafa02240c1916ce099f71a729e66 /mk/emulator/emulator-opsys.mk
parent8704d27510f1be0cd77257475b6f0cc340f14590 (diff)
downloadpkgsrc-e44e2c60b8c08c7926831a152cd9fbaf85c8e60f.tar.gz
Break out the inclusion of the operating-system-specific Makefile into
a separate emulator-opsys.mk file. The emulator-opsys.mk file defines EMUL_DISTRO and the various *EMUL*DIR* variables, as well as any opsys-specific variables. Include this file within compat_netbsd/Makefile.common so that the *EXEC_FMT variables (defined by the compat*/emulator.mk files) are defined. This fixes the build of compat* packages. XXX emulator-opsys.mk will go away in the near future as we do more XXX appropriate information hiding.
Diffstat (limited to 'mk/emulator/emulator-opsys.mk')
-rw-r--r--mk/emulator/emulator-opsys.mk46
1 files changed, 46 insertions, 0 deletions
diff --git a/mk/emulator/emulator-opsys.mk b/mk/emulator/emulator-opsys.mk
new file mode 100644
index 00000000000..f931d0ac7fb
--- /dev/null
+++ b/mk/emulator/emulator-opsys.mk
@@ -0,0 +1,46 @@
+# $NetBSD: emulator-opsys.mk,v 1.1 2007/08/23 15:59:33 jlam Exp $
+#
+# This file is included by emulator.mk.
+#
+# Variables defined by this file:
+#
+# EMUL_DISTRO
+# The distribution of the emulated operating system being used,
+# e.g. native-linux, suse-10.0, etc. If the package isn't
+# supported on this machine, then its value is "none".
+#
+# EMULDIR
+# Convenience variable that expands to ${PREFIX}/${EMULSUBDIR}
+#
+# EMULSUBDIR
+# Path relative to ${PREFIX} where the files and directories
+# are located, e.g. emul/linux.
+#
+# OPSYS_EMULDIR
+# Path through which the platform expects to find a "chroot"
+# installation of the files and directories, e.g. /emul/linux.
+#
+
+.if !defined(_EMULATOR_EMULATOR_OPSYS_MK)
+_EMULATOR_EMULATOR_OPSYS_MK= defined
+
+.if empty(EMUL_PLATFORMS:M${EMUL_PLATFORM})
+PKG_FAIL_REASON+= "${PKGNAME} is not available for ${MACHINE_PLATFORM}"
+.endif
+
+.if ${EMUL_PLATFORM} == "none"
+EMUL_DISTRO?= none
+EMULSUBDIR?= # empty
+EMULDIR?= ${PREFIX}
+OPSYS_EMULDIR?= # empty
+.else
+#
+# The ${EMUL_OPSYS}.mk file included here should define the following
+# variables either directly or indirectly:
+#
+# EMUL_DISTRO, EMULSUBDIR, EMULDIR, OPSYS_EMULDIR
+#
+. include "${.PARSEDIR}/${EMUL_OPSYS}.mk"
+.endif
+
+.endif # _EMULATOR_EMULATOR_OPSYS_MK