aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.port.mk
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2015-08-18 11:00:57 +0000
committerMathieu Arnold <mat@FreeBSD.org>2015-08-18 11:00:57 +0000
commitbfbc1e51b7139d49dc1522a1da94b02b732232c1 (patch)
treeef2ac534a3ac13f5ed200a8d98a2c397a0db9dc2 /Mk/bsd.port.mk
parent23ee2a7d628e74980199fb95b27ce242a5f718a6 (diff)
downloadports-bfbc1e51b7139d49dc1522a1da94b02b732232c1.tar.gz
ports-bfbc1e51b7139d49dc1522a1da94b02b732232c1.zip
Notes
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r--Mk/bsd.port.mk20
1 files changed, 19 insertions, 1 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index b6b82fa82f99..bfcc02fd8ce9 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -5019,6 +5019,18 @@ OPTIONS_WRONG_MULTI+= ${multi}
. undef OPTNOCHECK
.endfor
.undef multi
+
+.for opt in ${PORT_OPTIONS}
+. for conflict in ${${opt}_PREVENTS}
+. if ${PORT_OPTIONS:M${conflict}}
+. if empty(OPTIONS_WRONG_PREVENTS:M${opt})
+OPTIONS_WRONG_PREVENTS+= ${opt}
+. endif
+OPTIONS_WRONG_PREVENTS_${opt}+= ${conflict}
+. endif
+. endfor
+.endfor
+.undef conflict
.undef opt
.endif #pre-check-config
@@ -5033,7 +5045,13 @@ _check-config: pre-check-config
.for radio in ${OPTIONS_WRONG_RADIO}
@${ECHO_MSG} "====> You cannot select multiple options from the ${radio} radio"
.endfor
-.if !empty(OPTIONS_WRONG_MULTI) || !empty(OPTIONS_WRONG_SINGLE) || !empty(OPTIONS_WRONG_RADIO)
+.if defined(OPTIONS_WRONG_PREVENTS)
+ @${ECHO_MSG} "====> Two or more enabled options conflict with each other"
+. for prevents in ${OPTIONS_WRONG_PREVENTS}
+ @${ECHO_MSG} "=====> Option ${prevents} conflicts with ${OPTIONS_WRONG_PREVENTS_${prevents}} (select only one)"
+. endfor
+.endif
+.if !empty(OPTIONS_WRONG_MULTI) || !empty(OPTIONS_WRONG_SINGLE) || !empty(OPTIONS_WRONG_RADIO) || !empty(OPTIONS_WRONG_PREVENTS)
_CHECK_CONFIG_ERROR= true
.endif
.endif # _check-config