Changeset View
Changeset View
Standalone View
Standalone View
Mk/bsd.options.mk
Show First 20 Lines • Show All 190 Lines • ▼ Show 20 Lines | _OPTIONS_TARGETS= fetch:300:pre fetch:500:do fetch:700:post \ | ||||
patch:300:pre patch:500:do patch:700:post \ | patch:300:pre patch:500:do patch:700:post \ | ||||
configure:300:pre configure:500:do configure:700:post \ | configure:300:pre configure:500:do configure:700:post \ | ||||
build:300:pre build:500:do build:700:post \ | build:300:pre build:500:do build:700:post \ | ||||
install:300:pre install:500:do install:700:post \ | install:300:pre install:500:do install:700:post \ | ||||
test:300:pre test:500:do test:700:post \ | test:300:pre test:500:do test:700:post \ | ||||
package:300:pre package:500:do package:700:post \ | package:300:pre package:500:do package:700:post \ | ||||
stage:800:post | stage:800:post | ||||
# Set the default values for the global options, as defined by portmgr | PORT_OPTIONS+= DOCS NLS EXAMPLES IPV6 | ||||
.if !defined(NOPORTDOCS) | |||||
PORT_OPTIONS+= DOCS | |||||
.else | |||||
OPTIONS_WARNINGS+= "NOPORTDOCS" | |||||
WITHOUT+= DOCS | |||||
OPTIONS_WARNINGS_UNSET+= DOCS | |||||
.endif | |||||
.if !defined(WITHOUT_NLS) | |||||
PORT_OPTIONS+= NLS | |||||
.else | |||||
WITHOUT+= NLS | |||||
.endif | |||||
.if !defined(NOPORTEXAMPLES) | |||||
PORT_OPTIONS+= EXAMPLES | |||||
.else | |||||
OPTIONS_WARNINGS+= "NOPORTEXAMPLES" | |||||
WITHOUT+= EXAMPLES | |||||
OPTIONS_WARNINGS_UNSET+= EXAMPLES | |||||
.endif | |||||
PORT_OPTIONS+= IPV6 | |||||
# Add per arch options | # Add per arch options | ||||
.for opt in ${OPTIONS_DEFINE_${ARCH}} | .for opt in ${OPTIONS_DEFINE_${ARCH}} | ||||
.if empty(OPTIONS_DEFINE:M${opt}) | .if empty(OPTIONS_DEFINE:M${opt}) | ||||
OPTIONS_DEFINE+= ${opt} | OPTIONS_DEFINE+= ${opt} | ||||
.endif | .endif | ||||
.endfor | .endfor | ||||
# Add per arch defaults | # Add per arch defaults | ||||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | |||||
. endfor | . endfor | ||||
## options files (from dialog) | ## options files (from dialog) | ||||
. if exists(${OPTIONS_FILE}) && !make(rmconfig) | . if exists(${OPTIONS_FILE}) && !make(rmconfig) | ||||
. include "${OPTIONS_FILE}" | . include "${OPTIONS_FILE}" | ||||
. endif | . endif | ||||
. sinclude "${OPTIONS_FILE}.local" | . sinclude "${OPTIONS_FILE}.local" | ||||
### convert WITH and WITHOUT found in make.conf or reloaded from old optionsfile | |||||
# XXX once WITH_DEBUG is not magic any more, do remove the :NDEBUG from here. | |||||
.for opt in ${ALL_OPTIONS:NDEBUG} | |||||
.if defined(WITH_${opt}) | |||||
OPTIONS_WARNINGS+= "WITH_${opt}" | |||||
OPTIONS_WARNINGS_SET+= ${opt} | |||||
PORT_OPTIONS+= ${opt} | |||||
.endif | |||||
.if defined(WITHOUT_${opt}) | |||||
OPTIONS_WARNINGS+= "WITHOUT_${opt}" | |||||
OPTIONS_WARNINGS_UNSET+= ${opt} | |||||
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} | |||||
.endif | |||||
.endfor | |||||
_OPTIONS_UNIQUENAME= ${PKGNAMEPREFIX}${PORTNAME} | _OPTIONS_UNIQUENAME= ${PKGNAMEPREFIX}${PORTNAME} | ||||
.for _k in SET UNSET SET_FORCE UNSET_FORCE | .for _k in SET UNSET SET_FORCE UNSET_FORCE | ||||
.if defined(${_OPTIONS_UNIQUENAME}_${_k}) | .if defined(${_OPTIONS_UNIQUENAME}_${_k}) | ||||
WARNING+= "You are using ${_OPTIONS_UNIQUENAME}_${_k} which is not supported any more, use:" | WARNING+= "You are using ${_OPTIONS_UNIQUENAME}_${_k} which is not supported any more, use:" | ||||
WARNING+= "${OPTIONS_NAME}_${_k}= ${${_OPTIONS_UNIQUENAME}_${_k}}" | WARNING+= "${OPTIONS_NAME}_${_k}= ${${_OPTIONS_UNIQUENAME}_${_k}}" | ||||
.endif | .endif | ||||
.endfor | .endfor | ||||
.if defined(OPTIONS_WARNINGS) | |||||
WARNING+= "You are using the following deprecated options: ${OPTIONS_WARNINGS}" | |||||
WARNING+= "If you added them on the command line, you should replace them by" | |||||
WARNING+= "WITH=\"${OPTIONS_WARNINGS_SET}\" WITHOUT=\"${OPTIONS_WARNINGS_UNSET}\"" | |||||
WARNING+= "" | |||||
WARNING+= "If they are global options set in your make.conf, you should replace them with:" | |||||
.if defined(OPTIONS_WARNINGS_SET) | |||||
WARNING+= "OPTIONS_SET=${OPTIONS_WARNINGS_SET}" | |||||
.endif | |||||
.if defined(OPTIONS_WARNINGS_UNSET) | |||||
WARNING+= "OPTIONS_UNSET=${OPTIONS_WARNINGS_UNSET}" | |||||
.endif | |||||
WARNING+= "" | |||||
WARNING+= "If they are local to this port, you should use:" | |||||
.if defined(OPTIONS_WARNINGS_SET) | |||||
WARNING+= "${OPTIONS_NAME}_SET=${OPTIONS_WARNINGS_SET}" | |||||
.endif | |||||
.if defined(OPTIONS_WARNINGS_UNSET) | |||||
WARNING+= "${OPTIONS_NAME}_UNSET=${OPTIONS_WARNINGS_UNSET}" | |||||
.endif | |||||
.endif | |||||
## Finish by using the options set by the port config dialog, if any | ## Finish by using the options set by the port config dialog, if any | ||||
. for opt in ${OPTIONS_FILE_SET} | . for opt in ${OPTIONS_FILE_SET} | ||||
. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) | . if !empty(COMPLETE_OPTIONS_LIST:M${opt}) | ||||
PORT_OPTIONS+= ${opt} | PORT_OPTIONS+= ${opt} | ||||
NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} | NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} | ||||
. endif | . endif | ||||
. endfor | . endfor | ||||
▲ Show 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | |||||
# Finally, add options required by slave ports | # Finally, add options required by slave ports | ||||
PORT_OPTIONS+= ${OPTIONS_SLAVE} | PORT_OPTIONS+= ${OPTIONS_SLAVE} | ||||
# Sort options and eliminate duplicates | # Sort options and eliminate duplicates | ||||
PORT_OPTIONS:= ${PORT_OPTIONS:O:u} | PORT_OPTIONS:= ${PORT_OPTIONS:O:u} | ||||
## Now some compatibility | ## Now some compatibility | ||||
.if empty(PORT_OPTIONS:MDOCS) | .if empty(PORT_OPTIONS:MDOCS) | ||||
NOPORTDOCS= yes | PLIST_SUB+= PORTDOCS="@comment " | ||||
.else | |||||
PLIST_SUB+= PORTDOCS="" | |||||
.endif | .endif | ||||
.if empty(PORT_OPTIONS:MEXAMPLES) | .if empty(PORT_OPTIONS:MEXAMPLES) | ||||
NOPORTEXAMPLES= yes | PLIST_SUB+= PORTEXAMPLES="@comment " | ||||
.else | |||||
PLIST_SUB+= PORTEXAMPLES="" | |||||
.endif | .endif | ||||
.if ${PORT_OPTIONS:MDEBUG} | .if ${PORT_OPTIONS:MDEBUG} | ||||
WITH_DEBUG= yes | WITH_DEBUG= yes | ||||
.endif | .endif | ||||
.if defined(NO_OPTIONS_SORT) | .if defined(NO_OPTIONS_SORT) | ||||
ALL_OPTIONS= ${OPTIONS_DEFINE} | ALL_OPTIONS= ${OPTIONS_DEFINE} | ||||
▲ Show 20 Lines • Show All 171 Lines • Show Last 20 Lines |