svn commit: r414167 - head/Mk

Mathieu Arnold mat at FreeBSD.org
Thu Apr 28 12:06:28 UTC 2016


Author: mat
Date: Thu Apr 28 12:06:27 2016
New Revision: 414167
URL: https://svnweb.freebsd.org/changeset/ports/414167

Log:
  Add a warning about using PORTSDIR in a *_DEPENDS line.
  
  Sponsored by:	Absolight
  Differential Revision:	https://reviews.freebsd.org/D6075

Modified:
  head/Mk/bsd.port.mk   (contents, props changed)

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Thu Apr 28 09:36:32 2016	(r414166)
+++ head/Mk/bsd.port.mk	Thu Apr 28 12:06:27 2016	(r414167)
@@ -4328,6 +4328,17 @@ ${deptype:tl}-depends:
 _UNIFIED_DEPENDS=${PKG_DEPENDS} ${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS} ${TEST_DEPENDS}
 _DEPEND_SPECIALS=	${_UNIFIED_DEPENDS:M*\:*\:*:C,^[^:]*:([^:]*):.*$,\1,}
 
+.for d in ${_UNIFIED_DEPENDS:M*\:/*}
+# Fight .for variable interpolation differently for each version of make...
+.if defined(.PARSEDIR)
+_PORTSDIR_STR=	$${PORTSDIR}/
+DEV_WARNING+=	"It looks like the ${d} depends line has an absolute port origin, make sure to remove \$${_PORTSDIR_STR} from it."
+.else
+_PORTSDIR_STR=	$$$${PORTSDIR}/
+DEV_WARNING+=	"It looks like the ${d} depends line has an absolute port origin, make sure to remove \$${_PORTSDIR_STR} from it."
+.endif
+.endfor
+
 all-depends-list:
 	@${ALL-DEPENDS-LIST}
 


More information about the svn-ports-all mailing list