diff options
Diffstat (limited to 'mk')
-rw-r--r-- | mk/emulator/emulator-opsys.mk | 46 | ||||
-rw-r--r-- | mk/emulator/emulator.mk | 37 |
2 files changed, 48 insertions, 35 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 diff --git a/mk/emulator/emulator.mk b/mk/emulator/emulator.mk index ed7f30f913f..46ae5e1a9e7 100644 --- a/mk/emulator/emulator.mk +++ b/mk/emulator/emulator.mk @@ -1,4 +1,4 @@ -# $NetBSD: emulator.mk,v 1.4 2007/08/22 14:47:10 jlam Exp $ +# $NetBSD: emulator.mk,v 1.5 2007/08/23 15:59:34 jlam Exp $ # # This file is included by bsd.pkg.mk. # @@ -17,22 +17,6 @@ # # 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. -# # EMULSUBDIRSLASH # Expands to either ${EMULSUBDIR}/lib or just lib depending on # whether EMULSUBDIR is empty or not. It is meant to be used @@ -52,24 +36,7 @@ # of the ``emul-fetch'' target. # -.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 "../../mk/emulator/${EMUL_OPSYS}.mk" -.endif +.include "${.PARSEDIR}/emulator-opsys.mk" # If we're doing true binary emulation, then file paths found in the # package's binaries, libraries and scripts won't necessarily match the |