From d1da4b5fb6468bdad40989ad2fc0403579902c51 Mon Sep 17 00:00:00 2001 From: Herve Quiroz Date: Sun, 7 Nov 2004 00:51:53 +0000 Subject: 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 Approved by: glewis (co-maintainer) --- Mk/bsd.java.mk | 9 +++++++++ 1 file changed, 9 insertions(+) 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" \ -- cgit v1.2.3