Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F138006091
D13092.id35254.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D13092.id35254.diff
View Options
Index: Mk/bsd.options.mk
===================================================================
--- Mk/bsd.options.mk
+++ Mk/bsd.options.mk
@@ -640,22 +640,15 @@
.undef (SELECTED_OPTIONS)
.undef (DESELECTED_OPTIONS)
-.for opt in ${ALL_OPTIONS}
-. if ${PORT_OPTIONS:M${opt}}
-SELECTED_OPTIONS:= ${opt} ${SELECTED_OPTIONS}
-. else
-DESELECTED_OPTIONS:= ${opt} ${DESELECTED_OPTIONS}
-. endif
-.endfor
+# Wait to expand PORT_OPTIONS until the last moment in case something modifies
+# the selected OPTIONS after bsd.port.options.mk is included. This uses
+# bmake's :@ for loop.
+SELECTED_OPTIONS= ${ALL_OPTIONS:@opt@${PORT_OPTIONS:M${opt}}@}
+DESELECTED_OPTIONS= ${ALL_OPTIONS:@opt@${"${PORT_OPTIONS:M${opt}}":?:${opt}}@}
.for otype in MULTI GROUP SINGLE RADIO
. for m in ${OPTIONS_${otype}}
-. for opt in ${OPTIONS_${otype}_${m}}
-. if ${PORT_OPTIONS:M${opt}}
-SELECTED_OPTIONS:= ${opt} ${SELECTED_OPTIONS}
-. else
-DESELECTED_OPTIONS:= ${opt} ${DESELECTED_OPTIONS}
-. endif
-. endfor
+SELECTED_OPTIONS+= ${OPTIONS_${otype}_${m}:@opt@${PORT_OPTIONS:M${opt}}@}
+DESELECTED_OPTIONS+= ${OPTIONS_${otype}_${m}:@opt@${"${PORT_OPTIONS:M${opt}}":?:${opt}}@}
. endfor
.endfor
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 29, 2:02 AM (1 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26313731
Default Alt Text
D13092.id35254.diff (1 KB)
Attached To
Mode
D13092: Fix [DE]SELECTED_OPTIONS to lazily evaluate.
Attached
Detach File
Event Timeline
Log In to Comment