diff options
author | hq <hq@FreeBSD.org> | 2004-11-07 08:51:53 +0800 |
---|---|---|
committer | hq <hq@FreeBSD.org> | 2004-11-07 08:51:53 +0800 |
commit | cebee3581a23e5b3750c6569a19e6b3af2cd09b8 (patch) | |
tree | de4343bcc3bee6db2fa4da9952779b12a8bcaf36 | |
parent | 6465052118e8472b3cfa22f4b047cb97a7fcf7ba (diff) | |
download | freebsd-ports-gnome-cebee3581a23e5b3750c6569a19e6b3af2cd09b8.tar.gz freebsd-ports-gnome-cebee3581a23e5b3750c6569a19e6b3af2cd09b8.tar.zst freebsd-ports-gnome-cebee3581a23e5b3750c6569a19e6b3af2cd09b8.zip |
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)
-rw-r--r-- | Mk/bsd.java.mk | 9 |
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" \ |