summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorobache <obache>2009-10-20 02:33:01 +0000
committerobache <obache>2009-10-20 02:33:01 +0000
commit9d0b7b6f8ef386a88a89f515f9b1e6730cd47cd3 (patch)
tree14981d508c3e6097853fa09b8d663bce9b11058f /mk
parent6dd12592905b792f645dddee038589b8890b5e55 (diff)
downloadpkgsrc-9d0b7b6f8ef386a88a89f515f9b1e6730cd47cd3.tar.gz
Allow USE_JAVA=build (build dependency on jre).
Diffstat (limited to 'mk')
-rw-r--r--mk/java-vm.mk16
1 files changed, 11 insertions, 5 deletions
diff --git a/mk/java-vm.mk b/mk/java-vm.mk
index 9ec5fc64295..10144e5ac73 100644
--- a/mk/java-vm.mk
+++ b/mk/java-vm.mk
@@ -1,4 +1,4 @@
-# $NetBSD: java-vm.mk,v 1.70 2009/10/14 13:20:05 wiz Exp $
+# $NetBSD: java-vm.mk,v 1.71 2009/10/20 02:33:01 obache Exp $
#
# This Makefile fragment handles Java dependencies and make variables,
# and is meant to be included by packages that require Java either at
@@ -16,10 +16,12 @@
# Package-settable variables:
#
# USE_JAVA
-# When set to "yes", a build-time dependency on the JDK is added.
+# When set to "yes", a build-time dependency on the JDK and
+# a run-time dependency on the JRE are added.
# When set to "run", a run-time dependency on the JRE is added.
+# When set to "build", a build-time dependency on the JRE is added.
#
-# Possible values: yes run
+# Possible values: yes run build
# Default value: yes
#
# USE_JAVA2
@@ -317,9 +319,13 @@ _JAVA_HOME= ${_JAVA_HOME_DEFAULT}
EVAL_PREFIX+= _JAVA_HOME=${_JAVA_PKGBASE.${_PKG_JVM}}
.endif
-# We always need a run-time dependency on the JRE.
+# If we are not using Java for building, then we need a run-time dependency on
+# the JRE, otherwise, build-time dependency on the JRE.
.if defined(_JRE_PKGSRCDIR)
. if exists(${_JRE_PKGSRCDIR}/buildlink3.mk)
+. if !empty(USE_JAVA:M[bB][uU][iI][lL][dD])
+BUILDLINK_DEPMETHOD.${_JRE.${_PKG_JVM}}= build
+. endif
. include "${_JRE_PKGSRCDIR}/buildlink3.mk"
. endif
.endif
@@ -327,7 +333,7 @@ EVAL_PREFIX+= _JAVA_HOME=${_JAVA_PKGBASE.${_PKG_JVM}}
# If we are building Java software, then we need a build-time dependency on
# the JDK.
#
-.if empty(USE_JAVA:M[rR][uU][nN])
+.if !empty(USE_JAVA:M[yE][eE][sS])
. if defined(_JDK_PKGSRCDIR)
. if exists(${_JDK_PKGSRCDIR}/buildlink3.mk)
. include "${_JDK_PKGSRCDIR}/buildlink3.mk"