From owner-svn-ports-head@freebsd.org Sat Nov 4 01:16:32 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF601E5F254; Sat, 4 Nov 2017 01:16:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADDA07E7FF; Sat, 4 Nov 2017 01:16:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vA41GVSZ058634; Sat, 4 Nov 2017 01:16:31 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vA41GVPM058633; Sat, 4 Nov 2017 01:16:31 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201711040116.vA41GVPM058633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 4 Nov 2017 01:16:31 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r453438 - head/Mk X-SVN-Group: ports-head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/Mk X-SVN-Commit-Revision: 453438 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Nov 2017 01:16:33 -0000 Author: kevans (src committer) Date: Sat Nov 4 01:16:31 2017 New Revision: 453438 URL: https://svnweb.freebsd.org/changeset/ports/453438 Log: Mk/bsd.java.mk: Strict JAVA_{VERSION,VENDOR,ERROR} validation Currently, validation of JAVA_{VERSION,VENDOR,ERROR} does not constitute an error and make(1) will happily continue, potentially doing the wrong thing. Adjust the behavior as follows: - Only validate each var if it's defined - Remain verbose about what error exists and what's expected - Fail the build if validation fails bsd.java.mk exhibited this behavior up until r217132 inadvertently changed it to be non-fatal. PR: 220737 Approved by: portmgr (bdrewery) Modified: head/Mk/bsd.java.mk Modified: head/Mk/bsd.java.mk ============================================================================== --- head/Mk/bsd.java.mk Fri Nov 3 23:58:45 2017 (r453437) +++ head/Mk/bsd.java.mk Sat Nov 4 01:16:31 2017 (r453438) @@ -216,33 +216,39 @@ check-makevars:: . endfor # Error checking: JAVA_VERSION +.if defined(JAVA_VERSION) .if !defined(_JAVA_VERSION_LIST_REGEXP) _JAVA_VERSION_LIST_REGEXP= ${_JAVA_VERSION_LIST:C/\+/\\+/:ts|} .endif check-makevars:: - @test ! -z "${JAVA_VERSION}" && ( ${ECHO_CMD} "${JAVA_VERSION}" | ${TR} " " "\n" | ${GREP} -Eq "${_JAVA_VERSION_LIST_REGEXP}" || \ - (${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 + @( test ! -z "${JAVA_VERSION}" && ( ${ECHO_CMD} "${JAVA_VERSION}" | ${TR} " " "\n" | ${GREP} -Eq "${_JAVA_VERSION_LIST_REGEXP}")) || \ + (${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}) +.endif # Error checking: JAVA_VENDOR +.if defined(JAVA_VENDOR) .if !defined(_JAVA_VENDOR_LIST_REGEXP) _JAVA_VENDOR_LIST_REGEXP= ${_JAVA_VENDOR_LIST:ts|} .endif check-makevars:: - @test ! -z "${JAVA_VENDOR}" && ( ${ECHO_CMD} "${JAVA_VENDOR}" | ${TR} " " "\n" | ${GREP} -Eq "${_JAVA_VENDOR_LIST_REGEXP}" || \ + @( test ! -z "${JAVA_VENDOR}" && ( ${ECHO_CMD} "${JAVA_VENDOR}" | ${TR} " " "\n" | ${GREP} -Eq "${_JAVA_VENDOR_LIST_REGEXP}" )) || \ (${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}"; \ - ${FALSE})) || true + ${FALSE}) +.endif # Error checking: JAVA_OS +.if defined(JAVA_OS) .if !defined(_JAVA_OS_LIST_REGEXP) _JAVA_OS_LIST_REGEXP= ${_JAVA_OS_LIST:ts|} .endif check-makevars:: - @test ! -z "${JAVA_OS}" && ( ${ECHO_CMD} "${JAVA_OS}" | ${TR} " " "\n" | ${GREP} -Eq "${_JAVA_OS_LIST_REGEXP}" || \ + @( test ! -z "${JAVA_OS}" && ( ${ECHO_CMD} "${JAVA_OS}" | ${TR} " " "\n" | ${GREP} -Eq "${_JAVA_OS_LIST_REGEXP}")) || \ (${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}"; \ - ${FALSE})) || true + ${FALSE}) +.endif # Set default values for JAVA_BUILD and JAVA_RUN # When nothing is set, assume JAVA_BUILD=jdk and JAVA_RUN=jre