summaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-10-08 17:11:52 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-10-08 17:11:52 +0000
commit2e0c90c8833899a50e555dbc023d87d2920dcce1 (patch)
tree05d603440839ed5bd20f55e6abc80f4514bd3fe6 /Mk
parent44942206537e05ab35910e7f007e9f6268ad9172 (diff)
downloadfreebsd-ports-2e0c90c8833899a50e555dbc023d87d2920dcce1.zip
Check CATEGORIES sanity directly from bsd.sanity.mk
Differential Revision: https://reviews.freebsd.org/D917 Reviewed by: bdrewery
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.sanity.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/Mk/bsd.sanity.mk b/Mk/bsd.sanity.mk
index 12c271d6b7b2..5ae8c237662c 100644
--- a/Mk/bsd.sanity.mk
+++ b/Mk/bsd.sanity.mk
@@ -7,6 +7,15 @@
WARNING+= "WITHOUT_NLS is deprecated use OPTIONS_UNSET=NLS instead"
.endif
+.if defined(PKGORIGIN)
+.for _c in ${CATEGORIES}
+_CAT?= ${_c}
+.endfor
+.if ${.CURDIR:H:T} != ${_CAT}
+DEV_ERROR+= "The first entry in CATEGORIES should be the directory where the port lives"
+.endif
+.endif
+
#.if defined(WITHOUT_X11)
#WARNING+= "WITHOUT_X11 is deprecated use X11 option instead"
#.endif