aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.options.mk
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2019-04-18 14:28:07 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2019-04-18 14:28:07 +0000
commitf4bb5c8fec690156791bb23e81fb250c86038d16 (patch)
tree75f3ec5829df42ab640bc7b653f4d33c216c5939 /Mk/bsd.options.mk
parentb7e771196daef2edfa91f2f6b2ffb94e354bb9f8 (diff)
downloadports-f4bb5c8fec690156791bb23e81fb250c86038d16.tar.gz
ports-f4bb5c8fec690156791bb23e81fb250c86038d16.zip
Flag nop options helpers that appear after bsd.port.options.mk as DEV_ERRORs
Approved by: portmgr (mat) Differential Revision: https://reviews.freebsd.org/D19553
Notes
Notes: svn path=/head/; revision=499267
Diffstat (limited to 'Mk/bsd.options.mk')
-rw-r--r--Mk/bsd.options.mk21
1 files changed, 21 insertions, 0 deletions
diff --git a/Mk/bsd.options.mk b/Mk/bsd.options.mk
index 56eb4f026715..64673a02e785 100644
--- a/Mk/bsd.options.mk
+++ b/Mk/bsd.options.mk
@@ -192,6 +192,15 @@ _OPTIONS_FLAGS= ALL_TARGET BROKEN CATEGORIES CFLAGS CONFIGURE_ENV CONFLICTS \
PLIST_SUB PORTDOCS PORTEXAMPLES SUB_FILES SUB_LIST \
TEST_TARGET USES BINARY_ALIAS
_OPTIONS_DEPENDS= PKG FETCH EXTRACT PATCH BUILD LIB RUN TEST
+_ALL_OPTIONS_HELPERS= ${_OPTIONS_DEPENDS:S/$/_DEPENDS/} \
+ ${_OPTIONS_DEPENDS:S/$/_DEPENDS_OFF/} \
+ ${_OPTIONS_FLAGS:S/$/_OFF/} ${_OPTIONS_FLAGS} \
+ CMAKE_BOOL CMAKE_BOOL_OFF CMAKE_OFF CMAKE_ON \
+ CONFIGURE_ENABLE CONFIGURE_OFF CONFIGURE_ON \
+ CONFIGURE_WITH IMPLIES MESON_ARGS MESON_DISABLED \
+ MESON_ENABLED MESON_FALSE MESON_OFF MESON_ON MESON_TRUE \
+ PREVENTS PREVENTS_MSG QMAKE_OFF QMAKE_ON USE USE_OFF \
+ VARS VARS_OFF
# The format here is target_family:priority:target-type
_OPTIONS_TARGETS= fetch:300:pre fetch:500:do fetch:700:post \
@@ -608,6 +617,18 @@ _OPTIONS_${_target}:= ${_OPTIONS_${_target}} ${_prio}:${_type}-${_target}-${opt}
. endif
.endfor
+# Collect which options helpers are defined at this point for
+# bsd.sanity.mk later to make sure no other options helper is
+# defined after bsd.port.options.mk.
+_OPTIONS_HELPERS_SEEN=
+.for opt in ${_REALLY_ALL_POSSIBLE_OPTIONS}
+. for helper in ${_ALL_OPTIONS_HELPERS}
+. if defined(${opt}_${helper})
+_OPTIONS_HELPERS_SEEN+= ${opt}_${helper}
+. endif
+. endfor
+.endfor
+
.undef (SELECTED_OPTIONS)
.undef (DESELECTED_OPTIONS)
# Wait to expand PORT_OPTIONS until the last moment in case something modifies