View | Details | Raw Unified | Return to bug 220054 | Differences between
and this patch

Collapse All | Expand All

(-)bsd.java.mk (-22 / +8 lines)
Lines 207-264 Link Here
207
.		for variable in JAVA_HOME JAVA_PORT JAVA_PORT_VERSION JAVA_PORT_VENDOR JAVA_PORT_OS
207
.		for variable in JAVA_HOME JAVA_PORT JAVA_PORT_VERSION JAVA_PORT_VENDOR JAVA_PORT_OS
208
.			if defined(${variable})
208
.			if defined(${variable})
209
check-makevars::
209
check-makevars::
210
	@${ECHO_CMD} "${PKGNAME}: Environment error: \"${variable}\" should not be defined -- clearing."
210
	@${ECHO_CMD} "${PKGNAME}: Environment error: \"${variable}\" should not be defined -- clearing."
211
.undef				${variable}
211
.undef				${variable}
212
.			endif
212
.			endif
213
.		endfor
213
.		endfor
214
214
215
# Error checking: JAVA_VERSION
215
# Error checking: JAVA_VERSION
216
.if !defined(_JAVA_VERSION_LIST_REGEXP)
216
.if !defined(_JAVA_VERSION_LIST_REGEXP)
217
.	for v in ${_JAVA_VERSION_LIST}
217
_JAVA_VERSION_LIST_REGEXP=	${_JAVA_VERSION_LIST:C/\+/\\+/:ts|}
218
.		if defined(_JAVA_VERSION_LIST_REGEXP)
219
_JAVA_VERSION_LIST_REGEXP:=		${_JAVA_VERSION_LIST_REGEXP}\|
220
.		endif
221
_JAVA_VERSION_LIST_REGEXP:=		${_JAVA_VERSION_LIST_REGEXP}$v
222
.	endfor
223
.endif
218
.endif
224
219
225
226
check-makevars::
220
check-makevars::
227
	@test ! -z "${JAVA_VERSION}" && ( ${ECHO_CMD} "${JAVA_VERSION}" | ${TR} " " "\n" | ${GREP} -q "${_JAVA_VERSION_LIST_REGEXP}" || \
221
	@test ! -z "${JAVA_VERSION}" && ( ${ECHO_CMD} "${JAVA_VERSION}" | ${TR} " " "\n" | ${GREP} -Eq "${_JAVA_VERSION_LIST_REGEXP}" || \
228
	(${ECHO_CMD} "${PKGNAME}: Makefile error: \"${JAVA_VERSION}\" is not a valid value for JAVA_VERSION. It should be one or more of: ${__JAVA_VERSION_LIST} (with an optional \"+\" suffix.)"; ${FALSE})) || true
222
	(${ECHO_CMD} "${PKGNAME}: Makefile error: \"${JAVA_VERSION}\" is not a valid value for JAVA_VERSION. It should be one or more of: ${__JAVA_VERSION_LIST} (with an optional \"+\" suffix.)"; ${FALSE})) || true
229
223
230
# Error checking: JAVA_VENDOR
224
# Error checking: JAVA_VENDOR
231
.if !defined(_JAVA_VENDOR_LIST_REGEXP)
225
.if !defined(_JAVA_VENDOR_LIST_REGEXP)
232
.	for v in ${_JAVA_VENDOR_LIST}
226
_JAVA_VENDOR_LIST_REGEXP=	${_JAVA_VENDOR_LIST:ts|}
233
.		if defined(_JAVA_VENDOR_LIST_REGEXP)
234
_JAVA_VENDOR_LIST_REGEXP:=		${_JAVA_VENDOR_LIST_REGEXP}\|
235
.		endif
236
_JAVA_VENDOR_LIST_REGEXP:=		${_JAVA_VENDOR_LIST_REGEXP}$v
237
.	endfor
238
.endif
227
.endif
228
239
check-makevars::
229
check-makevars::
240
	@test ! -z "${JAVA_VENDOR}" && ( ${ECHO_CMD} "${JAVA_VENDOR}" | ${TR} " " "\n" | ${GREP} -q "${_JAVA_VENDOR_LIST_REGEXP}" || \
230
	@test ! -z "${JAVA_VENDOR}" && ( ${ECHO_CMD} "${JAVA_VENDOR}" | ${TR} " " "\n" | ${GREP} -Eq "${_JAVA_VENDOR_LIST_REGEXP}" || \
241
	(${ECHO_CMD} "${PKGNAME}: Makefile error: \"${JAVA_VENDOR}\" is not a valid value for JAVA_VENDOR. It should be one or more of: ${_JAVA_VENDOR_LIST}"; \
231
	(${ECHO_CMD} "${PKGNAME}: Makefile error: \"${JAVA_VENDOR}\" is not a valid value for JAVA_VENDOR. It should be one or more of: ${_JAVA_VENDOR_LIST}"; \
242
	${FALSE})) || true
232
	${FALSE})) || true
243
233
244
# Error checking: JAVA_OS
234
# Error checking: JAVA_OS
245
.if !defined(_JAVA_OS_LIST_REGEXP)
235
.if !defined(_JAVA_OS_LIST_REGEXP)
246
.	for v in ${_JAVA_OS_LIST}
236
_JAVA_OS_LIST_REGEXP=	${_JAVA_OS_LIST:ts|}
247
.		if defined(_JAVA_OS_LIST_REGEXP)
248
_JAVA_OS_LIST_REGEXP:=		${_JAVA_OS_LIST_REGEXP}\|
249
.		endif
250
_JAVA_OS_LIST_REGEXP:=		${_JAVA_OS_LIST_REGEXP}$v
251
.	endfor
252
.endif
237
.endif
238
253
check-makevars::
239
check-makevars::
254
	@test ! -z "${JAVA_OS}" && ( ${ECHO_CMD} "${JAVA_OS}" | ${TR} " " "\n" | ${GREP} -q "${_JAVA_OS_LIST_REGEXP}" || \
240
	@test ! -z "${JAVA_OS}" && ( ${ECHO_CMD} "${JAVA_OS}" | ${TR} " " "\n" | ${GREP} -Eq "${_JAVA_OS_LIST_REGEXP}" || \
255
	(${ECHO_CMD} "${PKGNAME}: Makefile error: \"${JAVA_OS}\" is not a valid value for JAVA_OS. It should be one or more of: ${_JAVA_OS_LIST}"; \
241
	(${ECHO_CMD} "${PKGNAME}: Makefile error: \"${JAVA_OS}\" is not a valid value for JAVA_OS. It should be one or more of: ${_JAVA_OS_LIST}"; \
256
	${FALSE})) || true
242
	${FALSE})) || true
257
243
258
# Set default values for JAVA_BUILD and JAVA_RUN
244
# Set default values for JAVA_BUILD and JAVA_RUN
259
# When nothing is set, assume JAVA_BUILD=jdk and JAVA_RUN=jre
245
# When nothing is set, assume JAVA_BUILD=jdk and JAVA_RUN=jre
260
# (unless NO_BUILD is set)
246
# (unless NO_BUILD is set)
261
.		if !defined(JAVA_EXTRACT) && !defined(JAVA_BUILD) && !defined(JAVA_RUN)
247
.		if !defined(JAVA_EXTRACT) && !defined(JAVA_BUILD) && !defined(JAVA_RUN)
262
.			if !defined(NO_BUILD)
248
.			if !defined(NO_BUILD)
263
JAVA_BUILD=	jdk
249
JAVA_BUILD=	jdk
264
.			endif
250
.			endif

Return to bug 220054