diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2015-04-16 00:14:47 +0800 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2015-04-16 00:14:47 +0800 |
commit | 72b59f45b7ee8e63ba2de02ce8b8d829b7659967 (patch) | |
tree | 1afe6c838a0760ee0ab2dcd29ec4f2b5327079fb /Mk | |
parent | d6551822b45996b09a703c3d1f158ef63fd4ec2a (diff) | |
download | freebsd-ports-gnome-72b59f45b7ee8e63ba2de02ce8b8d829b7659967.tar.gz freebsd-ports-gnome-72b59f45b7ee8e63ba2de02ce8b8d829b7659967.tar.zst freebsd-ports-gnome-72b59f45b7ee8e63ba2de02ce8b8d829b7659967.zip |
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
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.port.mk | 3 |
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" |