Page MenuHomeFreeBSD

D13092.id35254.diff
No OneTemporary

D13092.id35254.diff

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

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)

Event Timeline