diff options
author | jlam <jlam@pkgsrc.org> | 2002-10-14 12:10:54 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2002-10-14 12:10:54 +0000 |
commit | b57616f9a39b9f50b7fb75bf3a5aa8d239c742e7 (patch) | |
tree | 9275e93dc2fada56b3fb3e64744c616520db638b /mk/java.mk | |
parent | 75519375795b43b7c5f4056eed15e2f5b3ff9c31 (diff) | |
download | pkgsrc-b57616f9a39b9f50b7fb75bf3a5aa8d239c742e7.tar.gz |
Knock off a TODO item: when generating the internal list of acceptable
JVMs from the package-provided PKG_JVM_ACCEPTED list, filter out those
JVMs that aren't available for the current platform. This allows a
package to simply list all JVMs that may be used to build it in
PKG_JVM_ACCEPTED, regardless of platform issues, instead of having to
construct a different PKG_JVM_ACCEPTED based on the platform we are using.
Diffstat (limited to 'mk/java.mk')
-rw-r--r-- | mk/java.mk | 41 |
1 files changed, 30 insertions, 11 deletions
diff --git a/mk/java.mk b/mk/java.mk index 97bada017eb..9fb20e70d50 100644 --- a/mk/java.mk +++ b/mk/java.mk @@ -1,4 +1,4 @@ -# $NetBSD: java.mk,v 1.4 2002/10/14 11:48:04 jlam Exp $ +# $NetBSD: java.mk,v 1.5 2002/10/14 12:10:54 jlam Exp $ # # This Makefile fragment handles Java dependencies and make variables, # and is meant to be included by packages that require Java either at @@ -9,7 +9,7 @@ # # * add a full dependency on the JRE and possibly a build dependency # on the JDK, based on the value of USE_JAVA (if nonempty). You -# must explicitly set USE_JAVA=build to add the build dependency +# must explicitly set USE_JAVA=run to _not_ add the build dependency # on the JDK; # # There are two variables used to tweak the JVM selection: @@ -19,13 +19,6 @@ # # PKG_JVMS_ACCEPTED is a package-settable list of JVMs that may be used as # possible dependencies for the package. -# -# TODO: -# -# * Have some way to specify which JVMs are acceptable for each -# platform, and use the intersection of these JVMs and the ones -# listed in PKG_JVMS_ACCEPTED as the JVMS that may really be used. -# Currently, we assume all of the JVMs are usable by all platforms. .if !defined(JAVA_MK) JAVA_MK= # defined @@ -39,7 +32,10 @@ USE_JAVA= run .endif PKG_JVM_DEFAULT?= # empty -PKG_JVMS_ACCEPTED?= jdk sun-jdk13 sun-jdk14 blackdown-jdk13 kaffe +PKG_JVMS_ACCEPTED?= ${_PKG_JVMS} + +# This is a list of all of the JVMs that may be used with java.mk. +_PKG_JVMS?= jdk sun-jdk13 sun-jdk14 blackdown-jdk13 kaffe # To be deprecated: if PKG_JVM is explicitly set, then use it as the # default JVM. Note that this has lower precedence than PKG_JVM_DEFAULT. @@ -68,8 +64,31 @@ _PKG_JVM_DEFAULT?= kaffe . endif .endif +# These lists are copied from the JVM package Makefiles. +_ONLY_FOR_PLATFORMS.jdk= \ + NetBSD-*-i386 Linux-*-i[3-6]86 +_ONLY_FOR_PLATFORMS.blackdown-jdk13= \ + NetBSD-*-i386 NetBSD-*-powerpc NetBSD-*-sparc \ + Linux-*-i[3-6]86 Linux-*-powerpc Linux-*-sparc +.if ${USE_JAVA} == "run" +_ONLY_FOR_PLATFORMS.blackdown-jdk13+= \ + NetBSD-*-arm Linux-*-arm +.endif +_ONLY_FOR_PLATFORMS.sun-jdk13= \ + NetBSD-*-i386 Linux-*-i[3-6]86 Darwin-*-* +_ONLY_FOR_PLATFORMS.sun-jdk14= \ + NetBSD-1.5Z[A-Z]-i386 NetBSD-1.[6-9]*-i386 Linux-*-i[3-6]86 +_ONLY_FOR_PLATFORMS.kaffe= \ + *-*-arm32 *-*-i386 *-*-m68k *-*-mips* *-*-sparc *-*-powerpc + # Set the accepted JVMs for this platform. -_PKG_JVMS_ACCEPTED= ${PKG_JVMS_ACCEPTED} +.for _jvm_ in ${_PKG_JVMS} +. for _pattern_ in ${_ONLY_FOR_PLATFORMS.${_jvm_}} +. if !empty(MACHINE_PLATFORM:M${_pattern_}) +_PKG_JVMS_ACCEPTED+= ${PKG_JVMS_ACCEPTED:M${_jvm_}} +. endif +. endfor +.endfor _JAVA_PKGBASE.jdk= jdk _JAVA_PKGBASE.sun-jdk13= sun-jdk13 |