svn commit: r384060 - head/Mk
Bryan Drewery
bdrewery at FreeBSD.org
Wed Apr 15 16:14:48 UTC 2015
Author: bdrewery
Date: Wed Apr 15 16:14:47 2015
New Revision: 384060
URL: https://svnweb.freebsd.org/changeset/ports/384060
Log:
Improve the OSVERSION==UNAME_r validation from r369644 by skipping it
if OSVERSION is specified on the cmdline. This makes testing simpler.
This only works for bmake.
# make -V CONFIGURE_LIBS
-lnew_release
# make -V CONFIGURE_LIBS OSVERSION=800000
-lolder_release
# env OSVERSION=800000 make -V CONFIGURE_LIBS
make: "/root/svn/ports/Mk/bsd.port.mk" line 1182: UNAME_r (11.0-CURRENT) and OSVERSION (800000) do not agree on major version number.
# echo OSVERSION=800000 >> /etc/make.conf
# make -V CONFIGURE_LIBS
make: "/root/svn/ports/Mk/bsd.port.mk" line 1182: UNAME_r (11.0-CURRENT) and OSVERSION (800000) do not agree on major version number.
Reported by: danfe
With hat: portmgr
Modified:
head/Mk/bsd.port.mk
Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk Wed Apr 15 15:51:36 2015 (r384059)
+++ head/Mk/bsd.port.mk Wed Apr 15 16:14:47 2015 (r384060)
@@ -1176,11 +1176,14 @@ OSVERSION!= ${AWK} '/^\#define[[:blank:]
# Convert OSVERSION to major release number
_OSVERSION_MAJOR= ${OSVERSION:C/([0-9]?[0-9])([0-9][0-9])[0-9]{3}/\1/}
# Sanity checks for chroot/jail building.
+# Skip if OSVERSION specified on cmdline for testing. Only works for bmake.
+.if !defined(.MAKEOVERRIDES) || !${.MAKEOVERRIDES:MOSVERSION}
.if ${_OSVERSION_MAJOR} != ${UNAMER:R}
.error UNAME_r (${UNAMER}) and OSVERSION (${OSVERSION}) do not agree on major version number.
.elif ${_OSVERSION_MAJOR} != ${OSREL:R}
.error OSREL (${OSREL}) and OSVERSION (${OSVERSION}) do not agree on major version number.
.endif
+.endif
# Only define tools here (for transition period with between pkg tools)
.include "${PORTSDIR}/Mk/bsd.commands.mk"
More information about the svn-ports-head
mailing list