Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160985445
D19553.id55007.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D19553.id55007.diff
View Options
Index: Mk/bsd.options.mk
===================================================================
--- Mk/bsd.options.mk
+++ Mk/bsd.options.mk
@@ -192,6 +192,15 @@
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 \
@@ -606,6 +615,18 @@
_OPTIONS_${_target}:= ${_OPTIONS_${_target}} ${_prio}:${_type}-${_target}-${opt}-off
. endfor
. 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)
Index: Mk/bsd.sanity.mk
===================================================================
--- Mk/bsd.sanity.mk
+++ Mk/bsd.sanity.mk
@@ -286,3 +286,15 @@
DEV_ERROR+= "${a} is unsupported, please use ${${a}_ALT}"
.endif
.endfor
+
+_BROKEN_OPTIONS_HELPERS=
+.for opt in ${_REALLY_ALL_POSSIBLE_OPTIONS}
+. for helper in ${_ALL_OPTIONS_HELPERS}
+. if defined(${opt}_${helper}) && empty(_OPTIONS_HELPERS_SEEN:M${opt}_${helper})
+_BROKEN_OPTIONS_HELPERS+= ${opt}_${helper}
+. endif
+. endfor
+.endfor
+.if !empty(_BROKEN_OPTIONS_HELPERS)
+DEV_ERROR+= "The following options helpers are incorrectly set after bsd.port.options.mk and are ineffective: ${_BROKEN_OPTIONS_HELPERS}"
+.endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jun 30, 3:21 PM (14 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34509675
Default Alt Text
D19553.id55007.diff (2 KB)
Attached To
Mode
D19553: Mk/bsd.sanity.mk: Flag nop options helpers set after bsd.port.options.mk
Attached
Detach File
Event Timeline
Log In to Comment