summaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorHerve Quiroz <hq@FreeBSD.org>2004-11-07 00:51:53 +0000
committerHerve Quiroz <hq@FreeBSD.org>2004-11-07 00:51:53 +0000
commitd1da4b5fb6468bdad40989ad2fc0403579902c51 (patch)
treea139b056c1ae9460782173eb67c686b95e537085 /Mk
parentAdd net-mgmt/tcptrack: (diff)
Additional error checking: check for defined variables that should not be. With
this patch, for instance: $ cd /usr/port/devel/apache-ant $ make JAVA_HOME=toto apache-ant-1.6.2: Environement error: "JAVA_HOME" should not be defined. *** Error code 1 PR: 70914 Reported by: Rong-En Fan <rafan@infor.org> Approved by: glewis (co-maintainer)
Notes
Notes: svn path=/head/; revision=121019
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.java.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/Mk/bsd.java.mk b/Mk/bsd.java.mk
index a1a542aabfc2..b54c3644e9aa 100644
--- a/Mk/bsd.java.mk
+++ b/Mk/bsd.java.mk
@@ -291,6 +291,15 @@ check-makevars::
# From here, the port is using bsd.java.mk v2.0
+# Error checking: defined JAVA_{HOME,PORT,PORT_VERSION,PORT_VENDOR,PORT_OS}
+. for variable in JAVA_HOME JAVA_PORT JAVA_PORT_VERSION JAVA_PORT_VENDOR JAVA_PORT_OS
+. if defined(${variable})
+check-makevars::
+ @${ECHO_CMD} "${PKGNAME}: Environement error: \"${variable}\" should not be defined."
+ @${FALSE}
+. endif
+. endfor
+
# Error checking: JAVA_VERSION
_JAVA_VERSION_LIST_REGEXP!= ${ECHO_CMD} "${_JAVA_VERSION_LIST}" | ${SED} "s/ /\\\|/g"
_ERROR_CHECKING_JAVA_VERSION!= ${ECHO_CMD} "${JAVA_VERSION}" | ${TR} " " "\n" \