aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2013-07-05 21:16:57 +0800
committerbapt <bapt@FreeBSD.org>2013-07-05 21:16:57 +0800
commitce0ea3d9081feced69cb5e02882bf8607ed59a33 (patch)
tree10814bf908a75b1b1503c00f065b92aa2048101e /Mk
parent13f0301fe9d4ec7153fcb9f701eb3e8767f86f42 (diff)
downloadfreebsd-ports-graphics-ce0ea3d9081feced69cb5e02882bf8607ed59a33.tar.gz
freebsd-ports-graphics-ce0ea3d9081feced69cb5e02882bf8607ed59a33.tar.zst
freebsd-ports-graphics-ce0ea3d9081feced69cb5e02882bf8607ed59a33.zip
Add a mechanism to allow USES to define code to be loaded after post.mk
Reviewed by: bdrewery Exp-run by: bdrewery
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index ef714a57b46..dd1251bbe83 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1541,6 +1541,15 @@ check-makefile::
_POSTMKINCLUDED= yes
+# Loading features
+.for f in ${_USES_POST}
+_f=${f:C/\:.*//g}
+.if ${_f} != ${f}
+${_f}_ARGS:= ${f:C/^[^\:]*\://g}
+.endif
+.include "${USESDIR}/${_f}.mk"
+.endfor
+
WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/work
.if !defined(IGNORE_MASTER_SITE_GITHUB) && defined(USE_GITHUB)
WRKSRC?= ${WRKDIR}/${GH_ACCOUNT}-${GH_PROJECT}-${GH_COMMIT}