Lines 373-383
Link Here
|
373 |
|
373 |
|
374 |
## Enable options implied by other options |
374 |
## Enable options implied by other options |
375 |
# _PREVENTS is handled in bsd.port.mk:pre-check-config |
375 |
# _PREVENTS is handled in bsd.port.mk:pre-check-config |
376 |
.for count in ${PORT_OPTIONS} |
376 |
## 1) Build dependency chain in A.B format: |
377 |
. for opt in ${PORT_OPTIONS} |
377 |
_DEPCHAIN= |
378 |
PORT_OPTIONS+= ${${opt}_IMPLIES} |
378 |
.for opt in ${COMPLETE_OPTIONS_LIST} |
|
|
379 |
. for o in ${${opt}_IMPLIES} |
380 |
_DEPCHAIN+= ${opt}.$o |
379 |
. endfor |
381 |
. endfor |
380 |
.endfor |
382 |
.endfor |
|
|
383 |
## 2) Check each dependency pair and if LHS is in PORT_OPTIONS then add RHS. |
384 |
## All of RHS of "RHS.*" (i.e. indirect dependency) are also added for |
385 |
## fast convergence. |
386 |
_PORT_OPTIONS:= ${PORT_OPTIONS} |
387 |
.for count in _0 ${COMPLETE_OPTIONS_LIST} |
388 |
### Check if all of the nested dependency are resolved already. |
389 |
. if ${count} == _0 || ${_PORT_OPTIONS} != ${PORT_OPTIONS} |
390 |
PORT_OPTIONS:= ${_PORT_OPTIONS} |
391 |
. for dc in ${_DEPCHAIN} |
392 |
. for opt in ${_PORT_OPTIONS} |
393 |
_opt=${opt} |
394 |
### Add all of direct and indirect dependency only if |
395 |
### they are not in ${PORT_OPTIONS}. |
396 |
. if !empty(_opt:M${dc:R}) |
397 |
. for d in ${dc:E} ${_DEPCHAIN:M${dc:E}.*:E} |
398 |
. if empty(_PORT_OPTIONS:M$d) |
399 |
_PORT_OPTIONS+= $d |
400 |
. endif |
401 |
. endfor |
402 |
. endif |
403 |
. endfor |
404 |
. endfor |
405 |
. endif |
406 |
.endfor |
381 |
|
407 |
|
382 |
# Finally, add options required by slave ports |
408 |
# Finally, add options required by slave ports |
383 |
PORT_OPTIONS+= ${OPTIONS_SLAVE} |
409 |
PORT_OPTIONS+= ${OPTIONS_SLAVE} |