Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 87 lines (74 sloc) 2.553 kb
85811466 » jlam
2005-08-20 Use REQD_DIRS instead of MAKE_DIRS for directories under ${PREFIX} so
1 # $NetBSD: java-env.mk,v 1.6 2005/08/20 19:16:21 jlam Exp $
f2ab2b07 » jmmv
2004-05-22 Initial addition.
2 #
3 # This Makefile fragment handles Java wrappers and is meant to be included
4 # by packages that provide a Java build-time and/or run-time environment.
5 #
6 # The following variables can be defined in package Makefiles to tune the
7 # behavior of this file:
8 #
9 # JAVA_CLASSPATH Classpath that will be prepended on all invocations
10 # to this implementation. Optional.
11 #
12 # JAVA_HOME Path to the directory holding the Java implementation.
13 # Required.
14 #
15 # JAVA_NAME Base name of the Java implementation. This will be
16 # used as part of wrappers' names. Required.
17 #
18 # JAVA_UNLIMIT List of resources to be unlimited at runtime.
19 # Can include any of cmdsize, datasize and stacksize.
20 # Optional.
21 #
22 # JAVA_WRAPPERS List of wrappers to be created under ${PREFIX}/bin,
23 # pointing to binaries under ${JAVA_HOME}/bin. The
24 # names must match files in the later directory.
25 # Required (if empty, the inclusion of this file is
26 # useless).
27 #
28
29 .if !defined(JAVA_ENV_MK)
30 JAVA_ENV_MK= # defined
31
32 JAVA_NAME?= # undefined
33 JAVA_HOME?= # undefined
34 JAVA_CLASSPATH?= # empty
35 JAVA_UNLIMIT?= # empty
36 JAVA_WRAPPERS?= # empty
37
cc685f36 » jmmv
2004-05-23 Lets be pkgviews friendly: create the bin directory when installing w…
38 .if !empty(JAVA_WRAPPERS)
39 INSTALLATION_DIRS+= bin
40
1fe6ddfe » jmmv
2005-01-30 Convert the Java related packages to use the alternatives system. To do
41 ALTERNATIVES_SRC= ${WRKDIR}/.ALTERNATIVES
42 ${WRKDIR}/.ALTERNATIVES:
d5d2a281 » jmmv
2005-03-19 Let this file be included even if JAVA_WRAPPERS is empty; this was po…
43 . for w in ${JAVA_WRAPPERS}
1fe6ddfe » jmmv
2005-01-30 Convert the Java related packages to use the alternatives system. To do
44 @${ECHO} 'bin/${w} ${PREFIX}/bin/${JAVA_NAME}-${w}' \
45 >>${WRKDIR}/.ALTERNATIVES
d5d2a281 » jmmv
2005-03-19 Let this file be included even if JAVA_WRAPPERS is empty; this was po…
46 . endfor
1fe6ddfe » jmmv
2005-01-30 Convert the Java related packages to use the alternatives system. To do
47
d5d2a281 » jmmv
2005-03-19 Let this file be included even if JAVA_WRAPPERS is empty; this was po…
48 . for w in ${JAVA_WRAPPERS}
f2ab2b07 » jmmv
2004-05-22 Initial addition.
49
1df45a39 » jmmv
2004-05-23 Let a package specify which is the real binary for each wrapper (by s…
50 JAVA_WRAPPER_BIN.${w}?= ${JAVA_HOME}/bin/${w}
51
f2ab2b07 » jmmv
2004-05-22 Initial addition.
52 post-build: ${WRKDIR}/${w}
53
54 .PHONY: install-java-wrapper-${w}
55 post-install: install-java-wrapper-${w}
56
d5d2a281 » jmmv
2005-03-19 Let this file be included even if JAVA_WRAPPERS is empty; this was po…
57 . if !target(${WRKDIR}/${w})
f2ab2b07 » jmmv
2004-05-22 Initial addition.
58 ${WRKDIR}/${w}:
59 @${ECHO} 'Generating ${w} wrapper...'
60 @${ECHO} '#! ${SH}' >${WRKDIR}/${w}
61 @${ECHO} 'PATH=${JAVA_HOME}/bin:$${PATH}; export PATH' >>${WRKDIR}/${w}
62 @${ECHO} 'JAVA_HOME=${JAVA_HOME}; export JAVA_HOME' >>${WRKDIR}/${w}
63 @${ECHO} 'JVM_HOME=${JAVA_HOME}; export JVM_HOME' >>${WRKDIR}/${w}
d5d2a281 » jmmv
2005-03-19 Let this file be included even if JAVA_WRAPPERS is empty; this was po…
64 . if !empty(JAVA_CLASSPATH)
f2ab2b07 » jmmv
2004-05-22 Initial addition.
65 @${ECHO} 'CLASSPATH=${JAVA_CLASSPATH}:$${CLASSPATH}; export CLASSPATH' \
66 >>${WRKDIR}/${w}
d5d2a281 » jmmv
2005-03-19 Let this file be included even if JAVA_WRAPPERS is empty; this was po…
67 . endif
68 . for f in ${JAVA_UNLIMIT}
f2ab2b07 » jmmv
2004-05-22 Initial addition.
69 @${ECHO} '${ULIMIT_CMD_${f}}' >>${WRKDIR}/${w}
d5d2a281 » jmmv
2005-03-19 Let this file be included even if JAVA_WRAPPERS is empty; this was po…
70 . endfor
71 . undef f
1df45a39 » jmmv
2004-05-23 Let a package specify which is the real binary for each wrapper (by s…
72 @${ECHO} '${JAVA_WRAPPER_BIN.${w}} "$$@"' >>${WRKDIR}/${w}
d5d2a281 » jmmv
2005-03-19 Let this file be included even if JAVA_WRAPPERS is empty; this was po…
73 . endif
f2ab2b07 » jmmv
2004-05-22 Initial addition.
74
75 install-java-wrapper-${w}:
76 ${INSTALL_SCRIPT} ${WRKDIR}/${w} ${PREFIX}/bin/${JAVA_NAME}-${w}
77
d5d2a281 » jmmv
2005-03-19 Let this file be included even if JAVA_WRAPPERS is empty; this was po…
78 . endfor
79 . undef w
80 .endif
f2ab2b07 » jmmv
2004-05-22 Initial addition.
81
82 # Handle the ${PREFIX}/java shared directory automatically.
83 USE_PKGINSTALL= YES
85811466 » jlam
2005-08-20 Use REQD_DIRS instead of MAKE_DIRS for directories under ${PREFIX} so
84 REQD_DIRS+= ${PREFIX}/java
f2ab2b07 » jmmv
2004-05-22 Initial addition.
85 PRINT_PLIST_AWK+= /^@dirrm java$$/ { next; }
86
87 .endif # JAVA_ENV_MK
Something went wrong with that request. Please try again.