Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Aug 2015 13:07:31 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r395170 - head/Mk
Message-ID:  <201508241307.t7OD7VUj035106@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mat
Date: Mon Aug 24 13:07:31 2015
New Revision: 395170
URL: https://svnweb.freebsd.org/changeset/ports/395170

Log:
  Add an optional error message for opt_PREVENTS, opt_PREVENTS_MSG.
  
  Reviewed by:	bapt
  Sponsored by:	Absolight
  Differential Revision:	https://reviews.freebsd.org/D3469

Modified:
  head/Mk/bsd.options.mk
  head/Mk/bsd.port.mk

Modified: head/Mk/bsd.options.mk
==============================================================================
--- head/Mk/bsd.options.mk	Mon Aug 24 12:12:26 2015	(r395169)
+++ head/Mk/bsd.options.mk	Mon Aug 24 13:07:31 2015	(r395170)
@@ -100,6 +100,8 @@
 #				get enabled too.
 # ${opt}_PREVENTS		When opt is enabled, if any options in PREVENTS are
 #				also enabled, it will produce an error.
+# ${opt}_PREVENTS_MSG		Provides a message explaining why the options
+#				cannot be selected together.
 #
 # ${opt}_USE=	FOO=bar		When option is enabled, it will  enable
 #				USE_FOO+= bar

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Mon Aug 24 12:12:26 2015	(r395169)
+++ head/Mk/bsd.port.mk	Mon Aug 24 13:07:31 2015	(r395170)
@@ -5049,6 +5049,9 @@ _check-config: pre-check-config
 	@${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)"
+.    if defined(${prevents}_PREVENTS_MSG)
+	@${ECHO_MSG} "======> ${${prevents}_PREVENTS_MSG}"
+.    endif
 .  endfor
 .endif
 .if !empty(OPTIONS_WRONG_MULTI) || !empty(OPTIONS_WRONG_SINGLE) || !empty(OPTIONS_WRONG_RADIO) || !empty(OPTIONS_WRONG_PREVENTS)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508241307.t7OD7VUj035106>