aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Mk/bsd.port.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index c5bc0166031c..dbcb356a8423 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1176,11 +1176,14 @@ OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${SRC
# 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"