Skip to content
Browse files

Let this file be included even if JAVA_WRAPPERS is empty; this was po…

…ssible

before, but after the introduction of alternatives, a regression appeared.

This is useful for packages that install files inside ${PREFIX}/java so
that the directory is automatically removed when empty.

Problem exposed by sablevm-classpath as described in PR pkg/29643 by
Antoine Reilles.
  • Loading branch information...
1 parent 0dc873b commit f6bcc9a11f27bb0f74e62d89b205bf814af09b48 jmmv committed Mar 19, 2005
Showing with 14 additions and 14 deletions.
  1. +14 −14 mk/java-env.mk
View
28 mk/java-env.mk
@@ -1,4 +1,4 @@
-# $NetBSD: java-env.mk,v 1.4 2005/01/30 23:18:38 jmmv Exp $
+# $NetBSD: java-env.mk,v 1.5 2005/03/19 16:46:45 jmmv Exp $
#
# This Makefile fragment handles Java wrappers and is meant to be included
# by packages that provide a Java build-time and/or run-time environment.
@@ -37,16 +37,15 @@ JAVA_WRAPPERS?= # empty
.if !empty(JAVA_WRAPPERS)
INSTALLATION_DIRS+= bin
-.endif
ALTERNATIVES_SRC= ${WRKDIR}/.ALTERNATIVES
${WRKDIR}/.ALTERNATIVES:
-.for w in ${JAVA_WRAPPERS}
+. for w in ${JAVA_WRAPPERS}
@${ECHO} 'bin/${w} ${PREFIX}/bin/${JAVA_NAME}-${w}' \
>>${WRKDIR}/.ALTERNATIVES
-.endfor
+. endfor
-.for w in ${JAVA_WRAPPERS}
+. for w in ${JAVA_WRAPPERS}
JAVA_WRAPPER_BIN.${w}?= ${JAVA_HOME}/bin/${w}
@@ -55,29 +54,30 @@ post-build: ${WRKDIR}/${w}
.PHONY: install-java-wrapper-${w}
post-install: install-java-wrapper-${w}
-. if !target(${WRKDIR}/${w})
+. if !target(${WRKDIR}/${w})
${WRKDIR}/${w}:
@${ECHO} 'Generating ${w} wrapper...'
@${ECHO} '#! ${SH}' >${WRKDIR}/${w}
@${ECHO} 'PATH=${JAVA_HOME}/bin:$${PATH}; export PATH' >>${WRKDIR}/${w}
@${ECHO} 'JAVA_HOME=${JAVA_HOME}; export JAVA_HOME' >>${WRKDIR}/${w}
@${ECHO} 'JVM_HOME=${JAVA_HOME}; export JVM_HOME' >>${WRKDIR}/${w}
-. if !empty(JAVA_CLASSPATH)
+. if !empty(JAVA_CLASSPATH)
@${ECHO} 'CLASSPATH=${JAVA_CLASSPATH}:$${CLASSPATH}; export CLASSPATH' \
>>${WRKDIR}/${w}
-. endif
-. for f in ${JAVA_UNLIMIT}
+. endif
+. for f in ${JAVA_UNLIMIT}
@${ECHO} '${ULIMIT_CMD_${f}}' >>${WRKDIR}/${w}
-. endfor
-. undef f
+. endfor
+. undef f
@${ECHO} '${JAVA_WRAPPER_BIN.${w}} "$$@"' >>${WRKDIR}/${w}
-. endif
+. endif
install-java-wrapper-${w}:
${INSTALL_SCRIPT} ${WRKDIR}/${w} ${PREFIX}/bin/${JAVA_NAME}-${w}
-.endfor
-.undef w
+. endfor
+. undef w
+.endif
# Handle the ${PREFIX}/java shared directory automatically.
USE_PKGINSTALL= YES

0 comments on commit f6bcc9a

Please sign in to comment.
Something went wrong with that request. Please try again.