Changeset View
Changeset View
Standalone View
Standalone View
Mk/bsd.options.mk
Show First 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | |||||
## | ## | ||||
# Set all the options available for the ports, beginning with the | # Set all the options available for the ports, beginning with the | ||||
# global ones and ending with the ones decided by the maintainer. | # global ones and ending with the ones decided by the maintainer. | ||||
.if !defined(OPTIONSMKINCLUDED) | .if !defined(OPTIONSMKINCLUDED) | ||||
OPTIONSMKINCLUDED= bsd.options.mk | OPTIONSMKINCLUDED= bsd.options.mk | ||||
OPTIONS_NAME?= ${PKGORIGIN:S/\//_/} | OPTIONS_NAME?= ${PKGORIGIN:S/\//_/} | ||||
OPTIONSFILE?= ${PORT_DBDIR}/${UNIQUENAME}/options | |||||
OPTIONS_FILE?= ${PORT_DBDIR}/${OPTIONS_NAME}/options | OPTIONS_FILE?= ${PORT_DBDIR}/${OPTIONS_NAME}/options | ||||
_OPTIONS_FLAGS= ALL_TARGET CATEGORIES CFLAGS CONFIGURE_ENV CONFLICTS \ | _OPTIONS_FLAGS= ALL_TARGET CATEGORIES CFLAGS CONFIGURE_ENV CONFLICTS \ | ||||
CONFLICTS_BUILD CONFLICTS_INSTALL CPPFLAGS CXXFLAGS DISTFILES \ | CONFLICTS_BUILD CONFLICTS_INSTALL CPPFLAGS CXXFLAGS DISTFILES \ | ||||
EXTRA_PATCHES GH_ACCOUNT GH_PROJECT GH_TAGNAME INFO \ | EXTRA_PATCHES GH_ACCOUNT GH_PROJECT GH_TAGNAME INFO \ | ||||
INSTALL_TARGET LDFLAGS LIBS MAKE_ARGS MAKE_ENV PATCHFILES \ | INSTALL_TARGET LDFLAGS LIBS MAKE_ARGS MAKE_ENV PATCHFILES \ | ||||
PATCH_SITES PLIST_DIRS PLIST_DIRSTRY PLIST_FILES PLIST_SUB \ | PATCH_SITES PLIST_DIRS PLIST_DIRSTRY PLIST_FILES PLIST_SUB \ | ||||
PORTDOCS SUB_FILES SUB_LIST USES | PORTDOCS SUB_FILES SUB_LIST USES | ||||
▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | |||||
. endfor | . endfor | ||||
## Remove the options excluded system-wide (set by user in make.conf) | ## Remove the options excluded system-wide (set by user in make.conf) | ||||
. for opt in ${OPTIONS_UNSET} | . for opt in ${OPTIONS_UNSET} | ||||
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} | PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} | ||||
NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} | NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} | ||||
. endfor | . endfor | ||||
# XXX To remove once UNIQUENAME will be removed | |||||
## Set the options specified per-port (set by user in make.conf) | ## Set the options specified per-port (set by user in make.conf) | ||||
. for opt in ${${UNIQUENAME}_SET} | |||||
. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) | |||||
PORT_OPTIONS+= ${opt} | |||||
NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} | |||||
. endif | |||||
. endfor | |||||
## Unset the options excluded per-port (set by user in make.conf) | |||||
. for opt in ${${UNIQUENAME}_UNSET} | |||||
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} | |||||
NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} | |||||
. endfor | |||||
# XXX To remove once UNIQUENAME will be removed | |||||
## Set the options specified per-port (set by user in make.conf) | |||||
. for opt in ${${OPTIONS_NAME}_SET} | . for opt in ${${OPTIONS_NAME}_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 | ||||
## Unset the options excluded per-port (set by user in make.conf) | ## Unset the options excluded per-port (set by user in make.conf) | ||||
. for opt in ${${OPTIONS_NAME}_UNSET} | . for opt in ${${OPTIONS_NAME}_UNSET} | ||||
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} | PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} | ||||
NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} | NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} | ||||
. endfor | . endfor | ||||
# XXX to remove once UNIQUENAME is removed | |||||
## options files (from dialog) | ## options files (from dialog) | ||||
. if exists(${OPTIONSFILE}) && !make(rmconfig) | |||||
. include "${OPTIONSFILE}" | |||||
. endif | |||||
. sinclude "${OPTIONSFILE}.local" | |||||
# XXX to remove once UNIQUENAME is removed | |||||
## 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 | ### 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. | # XXX once WITH_DEBUG is not magic any more, do remove the :NDEBUG from here. | ||||
.for opt in ${ALL_OPTIONS:NDEBUG} | .for opt in ${ALL_OPTIONS:NDEBUG} | ||||
.if defined(WITH_${opt}) | .if defined(WITH_${opt}) | ||||
OPTIONS_WARNINGS+= "WITH_${opt}" | OPTIONS_WARNINGS+= "WITH_${opt}" | ||||
OPTIONS_WARNINGS_SET+= ${opt} | OPTIONS_WARNINGS_SET+= ${opt} | ||||
PORT_OPTIONS+= ${opt} | PORT_OPTIONS+= ${opt} | ||||
.endif | .endif | ||||
.if defined(WITHOUT_${opt}) | .if defined(WITHOUT_${opt}) | ||||
OPTIONS_WARNINGS+= "WITHOUT_${opt}" | OPTIONS_WARNINGS+= "WITHOUT_${opt}" | ||||
OPTIONS_WARNINGS_UNSET+= ${opt} | OPTIONS_WARNINGS_UNSET+= ${opt} | ||||
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} | PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} | ||||
.endif | .endif | ||||
.endfor | .endfor | ||||
_OPTIONS_UNIQUENAME= ${PKGNAMEPREFIX}${PORTNAME} | |||||
.for _k in SET UNSET SET_FORCE UNSET_FORCE | |||||
.if defined(${_OPTIONS_UNIQUENAME}_${_k}) | |||||
WARNING+= "You are using ${_OPTIONS_UNIQUENAME}_${_k} which is not supported any more, use:" | |||||
WARNING+= "${OPTIONS_NAME}_${_k}= ${${_OPTIONS_UNIQUENAME}_${_k}}" | |||||
.endif | |||||
.endfor | |||||
.if defined(OPTIONS_WARNINGS) | .if defined(OPTIONS_WARNINGS) | ||||
WARNING+= "You are using the following deprecated options: ${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+= "If you added them on the command line, you should replace them by" | ||||
WARNING+= "WITH=\"${OPTIONS_WARNINGS_SET}\" WITHOUT=\"${OPTIONS_WARNINGS_UNSET}\"" | WARNING+= "WITH=\"${OPTIONS_WARNINGS_SET}\" WITHOUT=\"${OPTIONS_WARNINGS_UNSET}\"" | ||||
WARNING+= "" | WARNING+= "" | ||||
WARNING+= "If they are global options set in your make.conf, you should replace them with:" | WARNING+= "If they are global options set in your make.conf, you should replace them with:" | ||||
.if defined(OPTIONS_WARNINGS_SET) | .if defined(OPTIONS_WARNINGS_SET) | ||||
WARNING+= "OPTIONS_SET=${OPTIONS_WARNINGS_SET}" | WARNING+= "OPTIONS_SET=${OPTIONS_WARNINGS_SET}" | ||||
Show All 35 Lines | |||||
. endif | . endif | ||||
. endfor | . endfor | ||||
## Remove the options excluded system-wide (set by user in make.conf) | ## Remove the options excluded system-wide (set by user in make.conf) | ||||
. for opt in ${OPTIONS_UNSET_FORCE} | . for opt in ${OPTIONS_UNSET_FORCE} | ||||
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} | PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} | ||||
NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} | NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} | ||||
. endfor | . endfor | ||||
# XXX To remove once UNIQUENAME will be removed | |||||
## Set the options specified per-port (set by user in make.conf) | |||||
. for opt in ${${UNIQUENAME}_SET_FORCE} | |||||
. if !empty(COMPLETE_OPTIONS_LIST:M${opt}) | |||||
PORT_OPTIONS+= ${opt} | |||||
NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} | |||||
. endif | |||||
. endfor | |||||
## Unset the options excluded per-port (set by user in make.conf) | |||||
. for opt in ${${UNIQUENAME}_UNSET_FORCE} | |||||
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}} | |||||
NEW_OPTIONS:= ${NEW_OPTIONS:N${opt}} | |||||
. endfor | |||||
# XXX To remove once UNIQUENAME will be removed | |||||
## Set the options specified per-port (set by user in make.conf) | ## Set the options specified per-port (set by user in make.conf) | ||||
. for opt in ${${OPTIONS_NAME}_SET_FORCE} | . for opt in ${${OPTIONS_NAME}_SET_FORCE} | ||||
. 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 149 Lines • Show Last 20 Lines |