2005-05-31 13:05:31 +02:00
|
|
|
# $NetBSD: bsd.options.mk,v 1.26 2005/05/31 11:05:31 dillo Exp $
|
bsd.options.mk provides boilerplate code for standard naming conventions
for handling per-package build options.
Before including this file, the following variables should be defined:
PKG_OPTIONS_VAR
This is a list of the name of the make(1) variables that
contain the options the user wishes to select. This
variable should be set in a package Makefile. E.g.,
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
or
PKG_OPTIONS_VAR= FOO_OPTIONS BAR_OPTIONS
PKG_SUPPORTED_OPTIONS
This is a list of build options supported by the package.
This variable should be set in a package Makefile. E.g.,
PKG_SUPPORTED_OPTIONS= kerberos ldap ssl
Optionally, the following variables may also be defined:
PKG_DEFAULT_OPTIONS
This is a list the options that should be built into
every package, if that option is supported. This
variable should be set in /etc/mk.conf.
${PKG_OPTIONS_VAR} (the variables named in PKG_OPTIONS_VAR)
These variables list the selected build options and
override any default options given in PKG_DEFAULT_OPTIONS.
If any of the options begin with a '-', then that option
is always removed from the selected build options, e.g.
PKG_DEFAULT_OPTIONS= kerberos ldap sasl
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= ${PKG_DEFAULT_OPTIONS} -sasl
# implies PKG_OPTIONS == "kerberos ldap"
or
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= kerberos -ldap ldap
# implies PKG_OPTIONS == "kerberos"
This variable should be set in /etc/mk.conf.
PKG_FAIL_UNSUPPORTED_OPTIONS
If this is set to "yes", then the presence of unsupported
options in PKG_OPTIONS.<pkg> (see below) causes the build
to fail. Set this to "no" to silently ignore unsupported
options. Default: "yes".
After including this file, the following variables are defined:
PKG_OPTIONS
This is the list of the selected build options, properly
filtered to remove unsupported and duplicate options.
Example usage:
-------------8<-------------8<-------------8<-------------8<-------------
# Global and legacy options
.if defined(USE_OPENLDAP) || defined(USE_SASL2)
. if !defined(PKG_OPTIONS.wibble)
. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
PKG_OPTIONS.wibble+= ldap
. endif
. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
PKG_OPTIONS.wibble+= sasl
. endif
. endif
.endif
PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
PKG_SUPPORTED_OPTIONS= ldap sasl
.include "../../mk/bsd.options.mk"
# Package-specific option-handling
###
### LDAP support
###
.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap/buildlink3.mk"
CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}
.endif
###
### SASL authentication
###
.if !empty(PKG_OPTIONS:Msasl)
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
.endif
-------------8<-------------8<-------------8<-------------8<-------------
2004-07-30 22:59:08 +02:00
|
|
|
#
|
|
|
|
# This Makefile fragment provides boilerplate code for standard naming
|
|
|
|
# conventions for handling per-package build options.
|
|
|
|
#
|
2005-05-08 15:43:30 +02:00
|
|
|
# Before including this file, the following variables can be defined:
|
bsd.options.mk provides boilerplate code for standard naming conventions
for handling per-package build options.
Before including this file, the following variables should be defined:
PKG_OPTIONS_VAR
This is a list of the name of the make(1) variables that
contain the options the user wishes to select. This
variable should be set in a package Makefile. E.g.,
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
or
PKG_OPTIONS_VAR= FOO_OPTIONS BAR_OPTIONS
PKG_SUPPORTED_OPTIONS
This is a list of build options supported by the package.
This variable should be set in a package Makefile. E.g.,
PKG_SUPPORTED_OPTIONS= kerberos ldap ssl
Optionally, the following variables may also be defined:
PKG_DEFAULT_OPTIONS
This is a list the options that should be built into
every package, if that option is supported. This
variable should be set in /etc/mk.conf.
${PKG_OPTIONS_VAR} (the variables named in PKG_OPTIONS_VAR)
These variables list the selected build options and
override any default options given in PKG_DEFAULT_OPTIONS.
If any of the options begin with a '-', then that option
is always removed from the selected build options, e.g.
PKG_DEFAULT_OPTIONS= kerberos ldap sasl
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= ${PKG_DEFAULT_OPTIONS} -sasl
# implies PKG_OPTIONS == "kerberos ldap"
or
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= kerberos -ldap ldap
# implies PKG_OPTIONS == "kerberos"
This variable should be set in /etc/mk.conf.
PKG_FAIL_UNSUPPORTED_OPTIONS
If this is set to "yes", then the presence of unsupported
options in PKG_OPTIONS.<pkg> (see below) causes the build
to fail. Set this to "no" to silently ignore unsupported
options. Default: "yes".
After including this file, the following variables are defined:
PKG_OPTIONS
This is the list of the selected build options, properly
filtered to remove unsupported and duplicate options.
Example usage:
-------------8<-------------8<-------------8<-------------8<-------------
# Global and legacy options
.if defined(USE_OPENLDAP) || defined(USE_SASL2)
. if !defined(PKG_OPTIONS.wibble)
. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
PKG_OPTIONS.wibble+= ldap
. endif
. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
PKG_OPTIONS.wibble+= sasl
. endif
. endif
.endif
PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
PKG_SUPPORTED_OPTIONS= ldap sasl
.include "../../mk/bsd.options.mk"
# Package-specific option-handling
###
### LDAP support
###
.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap/buildlink3.mk"
CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}
.endif
###
### SASL authentication
###
.if !empty(PKG_OPTIONS:Msasl)
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
.endif
-------------8<-------------8<-------------8<-------------8<-------------
2004-07-30 22:59:08 +02:00
|
|
|
#
|
2005-05-08 15:43:30 +02:00
|
|
|
# PKG_SUPPORTED_OPTIONS (must be defined)
|
bsd.options.mk provides boilerplate code for standard naming conventions
for handling per-package build options.
Before including this file, the following variables should be defined:
PKG_OPTIONS_VAR
This is a list of the name of the make(1) variables that
contain the options the user wishes to select. This
variable should be set in a package Makefile. E.g.,
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
or
PKG_OPTIONS_VAR= FOO_OPTIONS BAR_OPTIONS
PKG_SUPPORTED_OPTIONS
This is a list of build options supported by the package.
This variable should be set in a package Makefile. E.g.,
PKG_SUPPORTED_OPTIONS= kerberos ldap ssl
Optionally, the following variables may also be defined:
PKG_DEFAULT_OPTIONS
This is a list the options that should be built into
every package, if that option is supported. This
variable should be set in /etc/mk.conf.
${PKG_OPTIONS_VAR} (the variables named in PKG_OPTIONS_VAR)
These variables list the selected build options and
override any default options given in PKG_DEFAULT_OPTIONS.
If any of the options begin with a '-', then that option
is always removed from the selected build options, e.g.
PKG_DEFAULT_OPTIONS= kerberos ldap sasl
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= ${PKG_DEFAULT_OPTIONS} -sasl
# implies PKG_OPTIONS == "kerberos ldap"
or
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= kerberos -ldap ldap
# implies PKG_OPTIONS == "kerberos"
This variable should be set in /etc/mk.conf.
PKG_FAIL_UNSUPPORTED_OPTIONS
If this is set to "yes", then the presence of unsupported
options in PKG_OPTIONS.<pkg> (see below) causes the build
to fail. Set this to "no" to silently ignore unsupported
options. Default: "yes".
After including this file, the following variables are defined:
PKG_OPTIONS
This is the list of the selected build options, properly
filtered to remove unsupported and duplicate options.
Example usage:
-------------8<-------------8<-------------8<-------------8<-------------
# Global and legacy options
.if defined(USE_OPENLDAP) || defined(USE_SASL2)
. if !defined(PKG_OPTIONS.wibble)
. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
PKG_OPTIONS.wibble+= ldap
. endif
. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
PKG_OPTIONS.wibble+= sasl
. endif
. endif
.endif
PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
PKG_SUPPORTED_OPTIONS= ldap sasl
.include "../../mk/bsd.options.mk"
# Package-specific option-handling
###
### LDAP support
###
.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap/buildlink3.mk"
CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}
.endif
###
### SASL authentication
###
.if !empty(PKG_OPTIONS:Msasl)
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
.endif
-------------8<-------------8<-------------8<-------------8<-------------
2004-07-30 22:59:08 +02:00
|
|
|
# This is a list of build options supported by the package.
|
|
|
|
# This variable should be set in a package Makefile. E.g.,
|
|
|
|
#
|
|
|
|
# PKG_SUPPORTED_OPTIONS= kerberos ldap ssl
|
|
|
|
#
|
2005-05-08 15:43:30 +02:00
|
|
|
# PKG_OPTION_VAR (must be defined)
|
|
|
|
# The variable the user can set to enable or disable
|
|
|
|
# options specifically for this package.
|
|
|
|
#
|
|
|
|
# PKG_SUGGESTED_OPTIONS (defaults to empty)
|
|
|
|
# This is a list of build options which are enabled by default.
|
|
|
|
#
|
2005-05-25 13:18:35 +02:00
|
|
|
# PKG_OPTIONS_LEGACY_VARS
|
2005-05-08 15:43:30 +02:00
|
|
|
# This is a list of USE_VARIABLE:option pairs that
|
|
|
|
# map legacy /etc/mk.conf variables to their option
|
|
|
|
# counterparts.
|
2005-05-31 13:05:31 +02:00
|
|
|
#
|
|
|
|
# PKG_OPTIONS_LEGACY_OPTS
|
|
|
|
# This is a list of old-option:new-option pairs that
|
|
|
|
# map options that have been renamed to their new
|
|
|
|
# counterparts.
|
2005-05-08 15:43:30 +02:00
|
|
|
#
|
|
|
|
#
|
|
|
|
# Optionally, the user may define the following variables in /etc/mk.conf:
|
bsd.options.mk provides boilerplate code for standard naming conventions
for handling per-package build options.
Before including this file, the following variables should be defined:
PKG_OPTIONS_VAR
This is a list of the name of the make(1) variables that
contain the options the user wishes to select. This
variable should be set in a package Makefile. E.g.,
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
or
PKG_OPTIONS_VAR= FOO_OPTIONS BAR_OPTIONS
PKG_SUPPORTED_OPTIONS
This is a list of build options supported by the package.
This variable should be set in a package Makefile. E.g.,
PKG_SUPPORTED_OPTIONS= kerberos ldap ssl
Optionally, the following variables may also be defined:
PKG_DEFAULT_OPTIONS
This is a list the options that should be built into
every package, if that option is supported. This
variable should be set in /etc/mk.conf.
${PKG_OPTIONS_VAR} (the variables named in PKG_OPTIONS_VAR)
These variables list the selected build options and
override any default options given in PKG_DEFAULT_OPTIONS.
If any of the options begin with a '-', then that option
is always removed from the selected build options, e.g.
PKG_DEFAULT_OPTIONS= kerberos ldap sasl
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= ${PKG_DEFAULT_OPTIONS} -sasl
# implies PKG_OPTIONS == "kerberos ldap"
or
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= kerberos -ldap ldap
# implies PKG_OPTIONS == "kerberos"
This variable should be set in /etc/mk.conf.
PKG_FAIL_UNSUPPORTED_OPTIONS
If this is set to "yes", then the presence of unsupported
options in PKG_OPTIONS.<pkg> (see below) causes the build
to fail. Set this to "no" to silently ignore unsupported
options. Default: "yes".
After including this file, the following variables are defined:
PKG_OPTIONS
This is the list of the selected build options, properly
filtered to remove unsupported and duplicate options.
Example usage:
-------------8<-------------8<-------------8<-------------8<-------------
# Global and legacy options
.if defined(USE_OPENLDAP) || defined(USE_SASL2)
. if !defined(PKG_OPTIONS.wibble)
. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
PKG_OPTIONS.wibble+= ldap
. endif
. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
PKG_OPTIONS.wibble+= sasl
. endif
. endif
.endif
PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
PKG_SUPPORTED_OPTIONS= ldap sasl
.include "../../mk/bsd.options.mk"
# Package-specific option-handling
###
### LDAP support
###
.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap/buildlink3.mk"
CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}
.endif
###
### SASL authentication
###
.if !empty(PKG_OPTIONS:Msasl)
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
.endif
-------------8<-------------8<-------------8<-------------8<-------------
2004-07-30 22:59:08 +02:00
|
|
|
#
|
|
|
|
# PKG_DEFAULT_OPTIONS
|
2005-05-08 15:43:30 +02:00
|
|
|
# This variable can be used to override default
|
|
|
|
# options for every package. Options listed in this
|
|
|
|
# variable will be enabled in every package that
|
|
|
|
# supports them. If you prefix an option with `-',
|
|
|
|
# it will be disabled in every package.
|
|
|
|
#
|
|
|
|
# ${PKG_OPTIONS_VAR}
|
|
|
|
# This variable can be used to override default
|
|
|
|
# options and options listed in PKG_DEFAULT_OPTIONS.
|
|
|
|
# The syntax is the same as PKG_DEFAULT_OPTIONS.
|
bsd.options.mk provides boilerplate code for standard naming conventions
for handling per-package build options.
Before including this file, the following variables should be defined:
PKG_OPTIONS_VAR
This is a list of the name of the make(1) variables that
contain the options the user wishes to select. This
variable should be set in a package Makefile. E.g.,
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
or
PKG_OPTIONS_VAR= FOO_OPTIONS BAR_OPTIONS
PKG_SUPPORTED_OPTIONS
This is a list of build options supported by the package.
This variable should be set in a package Makefile. E.g.,
PKG_SUPPORTED_OPTIONS= kerberos ldap ssl
Optionally, the following variables may also be defined:
PKG_DEFAULT_OPTIONS
This is a list the options that should be built into
every package, if that option is supported. This
variable should be set in /etc/mk.conf.
${PKG_OPTIONS_VAR} (the variables named in PKG_OPTIONS_VAR)
These variables list the selected build options and
override any default options given in PKG_DEFAULT_OPTIONS.
If any of the options begin with a '-', then that option
is always removed from the selected build options, e.g.
PKG_DEFAULT_OPTIONS= kerberos ldap sasl
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= ${PKG_DEFAULT_OPTIONS} -sasl
# implies PKG_OPTIONS == "kerberos ldap"
or
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= kerberos -ldap ldap
# implies PKG_OPTIONS == "kerberos"
This variable should be set in /etc/mk.conf.
PKG_FAIL_UNSUPPORTED_OPTIONS
If this is set to "yes", then the presence of unsupported
options in PKG_OPTIONS.<pkg> (see below) causes the build
to fail. Set this to "no" to silently ignore unsupported
options. Default: "yes".
After including this file, the following variables are defined:
PKG_OPTIONS
This is the list of the selected build options, properly
filtered to remove unsupported and duplicate options.
Example usage:
-------------8<-------------8<-------------8<-------------8<-------------
# Global and legacy options
.if defined(USE_OPENLDAP) || defined(USE_SASL2)
. if !defined(PKG_OPTIONS.wibble)
. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
PKG_OPTIONS.wibble+= ldap
. endif
. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
PKG_OPTIONS.wibble+= sasl
. endif
. endif
.endif
PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
PKG_SUPPORTED_OPTIONS= ldap sasl
.include "../../mk/bsd.options.mk"
# Package-specific option-handling
###
### LDAP support
###
.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap/buildlink3.mk"
CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}
.endif
###
### SASL authentication
###
.if !empty(PKG_OPTIONS:Msasl)
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
.endif
-------------8<-------------8<-------------8<-------------8<-------------
2004-07-30 22:59:08 +02:00
|
|
|
#
|
|
|
|
# After including this file, the following variables are defined:
|
|
|
|
#
|
|
|
|
# PKG_OPTIONS
|
|
|
|
# This is the list of the selected build options, properly
|
|
|
|
# filtered to remove unsupported and duplicate options.
|
|
|
|
#
|
|
|
|
# Example usage:
|
|
|
|
#
|
|
|
|
# -------------8<-------------8<-------------8<-------------8<-------------
|
2005-05-19 03:15:57 +02:00
|
|
|
# PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
|
2005-05-31 13:05:31 +02:00
|
|
|
# PKG_SUPPORTED_OPTIONS= wibble-foo ldap sasl
|
|
|
|
# PKG_SUGGESTED_OPTIONS= wibble-foo
|
2005-05-08 15:43:30 +02:00
|
|
|
# PKG_OPTIONS_LEGACY_VARS+= WIBBLE_USE_OPENLDAP:ldap
|
|
|
|
# PKG_OPTIONS_LEGACY_VARS+= WIBBLE_USE_SASL2:sasl
|
2005-05-31 13:05:31 +02:00
|
|
|
# PKG_OPTIONS_LEGACY_OPTS+= foo:wibble-foo
|
bsd.options.mk provides boilerplate code for standard naming conventions
for handling per-package build options.
Before including this file, the following variables should be defined:
PKG_OPTIONS_VAR
This is a list of the name of the make(1) variables that
contain the options the user wishes to select. This
variable should be set in a package Makefile. E.g.,
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
or
PKG_OPTIONS_VAR= FOO_OPTIONS BAR_OPTIONS
PKG_SUPPORTED_OPTIONS
This is a list of build options supported by the package.
This variable should be set in a package Makefile. E.g.,
PKG_SUPPORTED_OPTIONS= kerberos ldap ssl
Optionally, the following variables may also be defined:
PKG_DEFAULT_OPTIONS
This is a list the options that should be built into
every package, if that option is supported. This
variable should be set in /etc/mk.conf.
${PKG_OPTIONS_VAR} (the variables named in PKG_OPTIONS_VAR)
These variables list the selected build options and
override any default options given in PKG_DEFAULT_OPTIONS.
If any of the options begin with a '-', then that option
is always removed from the selected build options, e.g.
PKG_DEFAULT_OPTIONS= kerberos ldap sasl
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= ${PKG_DEFAULT_OPTIONS} -sasl
# implies PKG_OPTIONS == "kerberos ldap"
or
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= kerberos -ldap ldap
# implies PKG_OPTIONS == "kerberos"
This variable should be set in /etc/mk.conf.
PKG_FAIL_UNSUPPORTED_OPTIONS
If this is set to "yes", then the presence of unsupported
options in PKG_OPTIONS.<pkg> (see below) causes the build
to fail. Set this to "no" to silently ignore unsupported
options. Default: "yes".
After including this file, the following variables are defined:
PKG_OPTIONS
This is the list of the selected build options, properly
filtered to remove unsupported and duplicate options.
Example usage:
-------------8<-------------8<-------------8<-------------8<-------------
# Global and legacy options
.if defined(USE_OPENLDAP) || defined(USE_SASL2)
. if !defined(PKG_OPTIONS.wibble)
. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
PKG_OPTIONS.wibble+= ldap
. endif
. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
PKG_OPTIONS.wibble+= sasl
. endif
. endif
.endif
PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
PKG_SUPPORTED_OPTIONS= ldap sasl
.include "../../mk/bsd.options.mk"
# Package-specific option-handling
###
### LDAP support
###
.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap/buildlink3.mk"
CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}
.endif
###
### SASL authentication
###
.if !empty(PKG_OPTIONS:Msasl)
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
.endif
-------------8<-------------8<-------------8<-------------8<-------------
2004-07-30 22:59:08 +02:00
|
|
|
#
|
|
|
|
# .include "../../mk/bsd.options.mk"
|
|
|
|
#
|
|
|
|
# # Package-specific option-handling
|
|
|
|
#
|
2005-05-08 15:43:30 +02:00
|
|
|
# ###
|
|
|
|
# ### FOO support
|
|
|
|
# ###
|
2005-05-31 13:05:31 +02:00
|
|
|
# .if !empty(PKG_OPTIONS:Mwibble-foo)
|
2005-05-08 15:43:30 +02:00
|
|
|
# CONFIGURE_ARGS+= --enable-foo
|
|
|
|
# .endif
|
|
|
|
|
bsd.options.mk provides boilerplate code for standard naming conventions
for handling per-package build options.
Before including this file, the following variables should be defined:
PKG_OPTIONS_VAR
This is a list of the name of the make(1) variables that
contain the options the user wishes to select. This
variable should be set in a package Makefile. E.g.,
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
or
PKG_OPTIONS_VAR= FOO_OPTIONS BAR_OPTIONS
PKG_SUPPORTED_OPTIONS
This is a list of build options supported by the package.
This variable should be set in a package Makefile. E.g.,
PKG_SUPPORTED_OPTIONS= kerberos ldap ssl
Optionally, the following variables may also be defined:
PKG_DEFAULT_OPTIONS
This is a list the options that should be built into
every package, if that option is supported. This
variable should be set in /etc/mk.conf.
${PKG_OPTIONS_VAR} (the variables named in PKG_OPTIONS_VAR)
These variables list the selected build options and
override any default options given in PKG_DEFAULT_OPTIONS.
If any of the options begin with a '-', then that option
is always removed from the selected build options, e.g.
PKG_DEFAULT_OPTIONS= kerberos ldap sasl
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= ${PKG_DEFAULT_OPTIONS} -sasl
# implies PKG_OPTIONS == "kerberos ldap"
or
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= kerberos -ldap ldap
# implies PKG_OPTIONS == "kerberos"
This variable should be set in /etc/mk.conf.
PKG_FAIL_UNSUPPORTED_OPTIONS
If this is set to "yes", then the presence of unsupported
options in PKG_OPTIONS.<pkg> (see below) causes the build
to fail. Set this to "no" to silently ignore unsupported
options. Default: "yes".
After including this file, the following variables are defined:
PKG_OPTIONS
This is the list of the selected build options, properly
filtered to remove unsupported and duplicate options.
Example usage:
-------------8<-------------8<-------------8<-------------8<-------------
# Global and legacy options
.if defined(USE_OPENLDAP) || defined(USE_SASL2)
. if !defined(PKG_OPTIONS.wibble)
. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
PKG_OPTIONS.wibble+= ldap
. endif
. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
PKG_OPTIONS.wibble+= sasl
. endif
. endif
.endif
PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
PKG_SUPPORTED_OPTIONS= ldap sasl
.include "../../mk/bsd.options.mk"
# Package-specific option-handling
###
### LDAP support
###
.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap/buildlink3.mk"
CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}
.endif
###
### SASL authentication
###
.if !empty(PKG_OPTIONS:Msasl)
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
.endif
-------------8<-------------8<-------------8<-------------8<-------------
2004-07-30 22:59:08 +02:00
|
|
|
# ###
|
|
|
|
# ### LDAP support
|
|
|
|
# ###
|
|
|
|
# .if !empty(PKG_OPTIONS:Mldap)
|
|
|
|
# . include "../../databases/openldap/buildlink3.mk"
|
|
|
|
# CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}
|
|
|
|
# .endif
|
|
|
|
#
|
|
|
|
# ###
|
|
|
|
# ### SASL authentication
|
|
|
|
# ###
|
|
|
|
# .if !empty(PKG_OPTIONS:Msasl)
|
|
|
|
# . include "../../security/cyrus-sasl2/buildlink3.mk"
|
|
|
|
# CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
|
|
|
|
# .endif
|
|
|
|
# -------------8<-------------8<-------------8<-------------8<-------------
|
|
|
|
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
2005-05-14 04:17:43 +02:00
|
|
|
# Define PKG_OPTIONS, no matter if we have an error or not, to suppress
|
|
|
|
# further make(1) warnings.
|
|
|
|
PKG_OPTIONS= # empty
|
|
|
|
|
bsd.options.mk provides boilerplate code for standard naming conventions
for handling per-package build options.
Before including this file, the following variables should be defined:
PKG_OPTIONS_VAR
This is a list of the name of the make(1) variables that
contain the options the user wishes to select. This
variable should be set in a package Makefile. E.g.,
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
or
PKG_OPTIONS_VAR= FOO_OPTIONS BAR_OPTIONS
PKG_SUPPORTED_OPTIONS
This is a list of build options supported by the package.
This variable should be set in a package Makefile. E.g.,
PKG_SUPPORTED_OPTIONS= kerberos ldap ssl
Optionally, the following variables may also be defined:
PKG_DEFAULT_OPTIONS
This is a list the options that should be built into
every package, if that option is supported. This
variable should be set in /etc/mk.conf.
${PKG_OPTIONS_VAR} (the variables named in PKG_OPTIONS_VAR)
These variables list the selected build options and
override any default options given in PKG_DEFAULT_OPTIONS.
If any of the options begin with a '-', then that option
is always removed from the selected build options, e.g.
PKG_DEFAULT_OPTIONS= kerberos ldap sasl
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= ${PKG_DEFAULT_OPTIONS} -sasl
# implies PKG_OPTIONS == "kerberos ldap"
or
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= kerberos -ldap ldap
# implies PKG_OPTIONS == "kerberos"
This variable should be set in /etc/mk.conf.
PKG_FAIL_UNSUPPORTED_OPTIONS
If this is set to "yes", then the presence of unsupported
options in PKG_OPTIONS.<pkg> (see below) causes the build
to fail. Set this to "no" to silently ignore unsupported
options. Default: "yes".
After including this file, the following variables are defined:
PKG_OPTIONS
This is the list of the selected build options, properly
filtered to remove unsupported and duplicate options.
Example usage:
-------------8<-------------8<-------------8<-------------8<-------------
# Global and legacy options
.if defined(USE_OPENLDAP) || defined(USE_SASL2)
. if !defined(PKG_OPTIONS.wibble)
. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
PKG_OPTIONS.wibble+= ldap
. endif
. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
PKG_OPTIONS.wibble+= sasl
. endif
. endif
.endif
PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
PKG_SUPPORTED_OPTIONS= ldap sasl
.include "../../mk/bsd.options.mk"
# Package-specific option-handling
###
### LDAP support
###
.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap/buildlink3.mk"
CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}
.endif
###
### SASL authentication
###
.if !empty(PKG_OPTIONS:Msasl)
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
.endif
-------------8<-------------8<-------------8<-------------8<-------------
2004-07-30 22:59:08 +02:00
|
|
|
# Check for variable definitions required before including this file.
|
|
|
|
.if !defined(PKG_SUPPORTED_OPTIONS)
|
|
|
|
PKG_FAIL_REASON+= "bsd.options.mk: PKG_SUPPORTED_OPTIONS is not defined."
|
2005-05-14 04:17:43 +02:00
|
|
|
.elif !defined(PKG_OPTIONS_VAR)
|
bsd.options.mk provides boilerplate code for standard naming conventions
for handling per-package build options.
Before including this file, the following variables should be defined:
PKG_OPTIONS_VAR
This is a list of the name of the make(1) variables that
contain the options the user wishes to select. This
variable should be set in a package Makefile. E.g.,
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
or
PKG_OPTIONS_VAR= FOO_OPTIONS BAR_OPTIONS
PKG_SUPPORTED_OPTIONS
This is a list of build options supported by the package.
This variable should be set in a package Makefile. E.g.,
PKG_SUPPORTED_OPTIONS= kerberos ldap ssl
Optionally, the following variables may also be defined:
PKG_DEFAULT_OPTIONS
This is a list the options that should be built into
every package, if that option is supported. This
variable should be set in /etc/mk.conf.
${PKG_OPTIONS_VAR} (the variables named in PKG_OPTIONS_VAR)
These variables list the selected build options and
override any default options given in PKG_DEFAULT_OPTIONS.
If any of the options begin with a '-', then that option
is always removed from the selected build options, e.g.
PKG_DEFAULT_OPTIONS= kerberos ldap sasl
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= ${PKG_DEFAULT_OPTIONS} -sasl
# implies PKG_OPTIONS == "kerberos ldap"
or
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= kerberos -ldap ldap
# implies PKG_OPTIONS == "kerberos"
This variable should be set in /etc/mk.conf.
PKG_FAIL_UNSUPPORTED_OPTIONS
If this is set to "yes", then the presence of unsupported
options in PKG_OPTIONS.<pkg> (see below) causes the build
to fail. Set this to "no" to silently ignore unsupported
options. Default: "yes".
After including this file, the following variables are defined:
PKG_OPTIONS
This is the list of the selected build options, properly
filtered to remove unsupported and duplicate options.
Example usage:
-------------8<-------------8<-------------8<-------------8<-------------
# Global and legacy options
.if defined(USE_OPENLDAP) || defined(USE_SASL2)
. if !defined(PKG_OPTIONS.wibble)
. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
PKG_OPTIONS.wibble+= ldap
. endif
. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
PKG_OPTIONS.wibble+= sasl
. endif
. endif
.endif
PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
PKG_SUPPORTED_OPTIONS= ldap sasl
.include "../../mk/bsd.options.mk"
# Package-specific option-handling
###
### LDAP support
###
.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap/buildlink3.mk"
CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}
.endif
###
### SASL authentication
###
.if !empty(PKG_OPTIONS:Msasl)
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
.endif
-------------8<-------------8<-------------8<-------------8<-------------
2004-07-30 22:59:08 +02:00
|
|
|
PKG_FAIL_REASON+= "bsd.options.mk: PKG_OPTIONS_VAR is not defined."
|
2005-05-14 04:17:43 +02:00
|
|
|
.else # process the rest of the file
|
bsd.options.mk provides boilerplate code for standard naming conventions
for handling per-package build options.
Before including this file, the following variables should be defined:
PKG_OPTIONS_VAR
This is a list of the name of the make(1) variables that
contain the options the user wishes to select. This
variable should be set in a package Makefile. E.g.,
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
or
PKG_OPTIONS_VAR= FOO_OPTIONS BAR_OPTIONS
PKG_SUPPORTED_OPTIONS
This is a list of build options supported by the package.
This variable should be set in a package Makefile. E.g.,
PKG_SUPPORTED_OPTIONS= kerberos ldap ssl
Optionally, the following variables may also be defined:
PKG_DEFAULT_OPTIONS
This is a list the options that should be built into
every package, if that option is supported. This
variable should be set in /etc/mk.conf.
${PKG_OPTIONS_VAR} (the variables named in PKG_OPTIONS_VAR)
These variables list the selected build options and
override any default options given in PKG_DEFAULT_OPTIONS.
If any of the options begin with a '-', then that option
is always removed from the selected build options, e.g.
PKG_DEFAULT_OPTIONS= kerberos ldap sasl
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= ${PKG_DEFAULT_OPTIONS} -sasl
# implies PKG_OPTIONS == "kerberos ldap"
or
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= kerberos -ldap ldap
# implies PKG_OPTIONS == "kerberos"
This variable should be set in /etc/mk.conf.
PKG_FAIL_UNSUPPORTED_OPTIONS
If this is set to "yes", then the presence of unsupported
options in PKG_OPTIONS.<pkg> (see below) causes the build
to fail. Set this to "no" to silently ignore unsupported
options. Default: "yes".
After including this file, the following variables are defined:
PKG_OPTIONS
This is the list of the selected build options, properly
filtered to remove unsupported and duplicate options.
Example usage:
-------------8<-------------8<-------------8<-------------8<-------------
# Global and legacy options
.if defined(USE_OPENLDAP) || defined(USE_SASL2)
. if !defined(PKG_OPTIONS.wibble)
. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
PKG_OPTIONS.wibble+= ldap
. endif
. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
PKG_OPTIONS.wibble+= sasl
. endif
. endif
.endif
PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
PKG_SUPPORTED_OPTIONS= ldap sasl
.include "../../mk/bsd.options.mk"
# Package-specific option-handling
###
### LDAP support
###
.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap/buildlink3.mk"
CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}
.endif
###
### SASL authentication
###
.if !empty(PKG_OPTIONS:Msasl)
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
.endif
-------------8<-------------8<-------------8<-------------8<-------------
2004-07-30 22:59:08 +02:00
|
|
|
|
2005-05-08 15:43:30 +02:00
|
|
|
# include deprecated variable to options mapping
|
2005-05-14 04:17:43 +02:00
|
|
|
.include "${.CURDIR}/../../mk/defaults/obsolete.mk"
|
bsd.options.mk provides boilerplate code for standard naming conventions
for handling per-package build options.
Before including this file, the following variables should be defined:
PKG_OPTIONS_VAR
This is a list of the name of the make(1) variables that
contain the options the user wishes to select. This
variable should be set in a package Makefile. E.g.,
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
or
PKG_OPTIONS_VAR= FOO_OPTIONS BAR_OPTIONS
PKG_SUPPORTED_OPTIONS
This is a list of build options supported by the package.
This variable should be set in a package Makefile. E.g.,
PKG_SUPPORTED_OPTIONS= kerberos ldap ssl
Optionally, the following variables may also be defined:
PKG_DEFAULT_OPTIONS
This is a list the options that should be built into
every package, if that option is supported. This
variable should be set in /etc/mk.conf.
${PKG_OPTIONS_VAR} (the variables named in PKG_OPTIONS_VAR)
These variables list the selected build options and
override any default options given in PKG_DEFAULT_OPTIONS.
If any of the options begin with a '-', then that option
is always removed from the selected build options, e.g.
PKG_DEFAULT_OPTIONS= kerberos ldap sasl
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= ${PKG_DEFAULT_OPTIONS} -sasl
# implies PKG_OPTIONS == "kerberos ldap"
or
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= kerberos -ldap ldap
# implies PKG_OPTIONS == "kerberos"
This variable should be set in /etc/mk.conf.
PKG_FAIL_UNSUPPORTED_OPTIONS
If this is set to "yes", then the presence of unsupported
options in PKG_OPTIONS.<pkg> (see below) causes the build
to fail. Set this to "no" to silently ignore unsupported
options. Default: "yes".
After including this file, the following variables are defined:
PKG_OPTIONS
This is the list of the selected build options, properly
filtered to remove unsupported and duplicate options.
Example usage:
-------------8<-------------8<-------------8<-------------8<-------------
# Global and legacy options
.if defined(USE_OPENLDAP) || defined(USE_SASL2)
. if !defined(PKG_OPTIONS.wibble)
. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
PKG_OPTIONS.wibble+= ldap
. endif
. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
PKG_OPTIONS.wibble+= sasl
. endif
. endif
.endif
PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
PKG_SUPPORTED_OPTIONS= ldap sasl
.include "../../mk/bsd.options.mk"
# Package-specific option-handling
###
### LDAP support
###
.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap/buildlink3.mk"
CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}
.endif
###
### SASL authentication
###
.if !empty(PKG_OPTIONS:Msasl)
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
.endif
-------------8<-------------8<-------------8<-------------8<-------------
2004-07-30 22:59:08 +02:00
|
|
|
|
2005-05-08 15:43:30 +02:00
|
|
|
.for _m_ in ${PKG_OPTIONS_LEGACY_VARS}
|
2005-05-25 13:18:35 +02:00
|
|
|
_var_:= ${_m_:C/:.*//}
|
|
|
|
_opt_:= ${_m_:C/.*://}
|
|
|
|
_popt_:=${_opt_:C/-//}
|
|
|
|
. if !empty(PKG_SUPPORTED_OPTIONS:M${_popt_})
|
|
|
|
. if defined(${_var_}) && !empty(${_var_}:M[yY][eE][sS])
|
|
|
|
_PKG_LEGACY_OPTIONS:=${_PKG_LEGACY_OPTIONS} ${_opt_}
|
|
|
|
_DEPRECATED_WARNING:=${_DEPRECATED_WARNING} "Deprecated variable "${_var_:Q}" used, use PKG_DEFAULT_OPTIONS+="${_opt_:Q}" instead."
|
|
|
|
. endif
|
|
|
|
. endif
|
bsd.options.mk provides boilerplate code for standard naming conventions
for handling per-package build options.
Before including this file, the following variables should be defined:
PKG_OPTIONS_VAR
This is a list of the name of the make(1) variables that
contain the options the user wishes to select. This
variable should be set in a package Makefile. E.g.,
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
or
PKG_OPTIONS_VAR= FOO_OPTIONS BAR_OPTIONS
PKG_SUPPORTED_OPTIONS
This is a list of build options supported by the package.
This variable should be set in a package Makefile. E.g.,
PKG_SUPPORTED_OPTIONS= kerberos ldap ssl
Optionally, the following variables may also be defined:
PKG_DEFAULT_OPTIONS
This is a list the options that should be built into
every package, if that option is supported. This
variable should be set in /etc/mk.conf.
${PKG_OPTIONS_VAR} (the variables named in PKG_OPTIONS_VAR)
These variables list the selected build options and
override any default options given in PKG_DEFAULT_OPTIONS.
If any of the options begin with a '-', then that option
is always removed from the selected build options, e.g.
PKG_DEFAULT_OPTIONS= kerberos ldap sasl
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= ${PKG_DEFAULT_OPTIONS} -sasl
# implies PKG_OPTIONS == "kerberos ldap"
or
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= kerberos -ldap ldap
# implies PKG_OPTIONS == "kerberos"
This variable should be set in /etc/mk.conf.
PKG_FAIL_UNSUPPORTED_OPTIONS
If this is set to "yes", then the presence of unsupported
options in PKG_OPTIONS.<pkg> (see below) causes the build
to fail. Set this to "no" to silently ignore unsupported
options. Default: "yes".
After including this file, the following variables are defined:
PKG_OPTIONS
This is the list of the selected build options, properly
filtered to remove unsupported and duplicate options.
Example usage:
-------------8<-------------8<-------------8<-------------8<-------------
# Global and legacy options
.if defined(USE_OPENLDAP) || defined(USE_SASL2)
. if !defined(PKG_OPTIONS.wibble)
. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
PKG_OPTIONS.wibble+= ldap
. endif
. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
PKG_OPTIONS.wibble+= sasl
. endif
. endif
.endif
PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
PKG_SUPPORTED_OPTIONS= ldap sasl
.include "../../mk/bsd.options.mk"
# Package-specific option-handling
###
### LDAP support
###
.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap/buildlink3.mk"
CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}
.endif
###
### SASL authentication
###
.if !empty(PKG_OPTIONS:Msasl)
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
.endif
-------------8<-------------8<-------------8<-------------8<-------------
2004-07-30 22:59:08 +02:00
|
|
|
.endfor
|
2005-05-25 13:18:35 +02:00
|
|
|
.undef _var_
|
|
|
|
.undef _opt_
|
|
|
|
.undef _popt_
|
2005-05-08 15:43:30 +02:00
|
|
|
|
2005-05-31 13:05:31 +02:00
|
|
|
.for _m_ in ${PKG_OPTIONS_LEGACY_OPTS}
|
|
|
|
_old_:= ${_m_:C/:.*//}
|
|
|
|
_new_:= ${_m_:C/.*://}
|
|
|
|
. if !empty(PKG_SUPPORTED_OPTIONS:M${_new_})
|
|
|
|
_PKG_LEGACY_OPTMAP.${_old_}:=${_new_}
|
|
|
|
_DEPRECATED_WARNING:=${_DEPRECATED_WARNING} "Deprecated option "${_old_:Q}" used, use option "${_new_:Q}" instead."
|
|
|
|
. endif
|
|
|
|
.endfor
|
|
|
|
.undef _old_
|
|
|
|
.undef _new_
|
|
|
|
|
2005-05-28 14:14:34 +02:00
|
|
|
#
|
|
|
|
# filter unsupported options from PKG_DEFAULT_OPTIONS
|
|
|
|
#
|
|
|
|
_OPTIONS_DEFAULT_SUPPORED:= #empty
|
|
|
|
.for _o_ in ${PKG_DEFAULT_OPTIONS}
|
|
|
|
_opt_:= ${_o_}
|
|
|
|
_popt_:= ${_opt_:C/^-//}
|
2005-05-31 13:05:31 +02:00
|
|
|
.if !empty(PKG_SUPPORTED_OPTIONS:M${_popt_}) \
|
|
|
|
|| defined(_PKG_LEGACY_OPTMAP.${_popt_})
|
2005-05-28 14:14:34 +02:00
|
|
|
_OPTIONS_DEFAULT_SUPPORTED:=${_OPTIONS_DEFAULT_SUPPORTED} ${_opt_}
|
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
.undef _opt_
|
|
|
|
.undef _popt_
|
|
|
|
|
2005-05-08 15:43:30 +02:00
|
|
|
#
|
2005-05-16 11:08:29 +02:00
|
|
|
# process options from generic to specific
|
|
|
|
#
|
2005-05-28 14:14:34 +02:00
|
|
|
PKG_OPTIONS:= # empty
|
|
|
|
_OPTIONS_UNSUPPORTED:= #empty
|
2005-05-16 11:08:29 +02:00
|
|
|
.for _o_ in ${PKG_SUGGESTED_OPTIONS} ${_PKG_LEGACY_OPTIONS} \
|
2005-05-28 14:14:34 +02:00
|
|
|
${_OPTIONS_DEFAULT_SUPPORTED} ${${PKG_OPTIONS_VAR}}
|
2005-05-16 11:08:29 +02:00
|
|
|
_opt_:= ${_o_}
|
2005-05-28 14:14:34 +02:00
|
|
|
_popt_:= ${_o_:C/^-//} # positive option
|
2005-05-31 13:05:31 +02:00
|
|
|
. if defined(_PKG_LEGACY_OPTMAP.${_popt_})
|
|
|
|
_popt_:= ${_PKG_LEGACY_OPTMAP.${_popt_}}
|
|
|
|
. if empty(_opt_:M-*)
|
|
|
|
_opt_:= ${_popt_}
|
|
|
|
. else
|
|
|
|
_opt_:= -${_popt_}
|
|
|
|
. endif
|
|
|
|
. endif
|
2005-05-28 14:14:34 +02:00
|
|
|
. if empty(PKG_SUPPORTED_OPTIONS:M${_popt_})
|
|
|
|
_OPTIONS_UNSUPPORTED:=${_OPTIONS_UNSUPPORTED} ${_opt_}
|
|
|
|
. else
|
|
|
|
. if !empty(_opt_:M-*)
|
2005-05-16 11:08:29 +02:00
|
|
|
PKG_OPTIONS:= ${PKG_OPTIONS:N${_popt_}}
|
2005-05-28 14:14:34 +02:00
|
|
|
. else
|
2005-05-16 11:08:29 +02:00
|
|
|
PKG_OPTIONS:= ${PKG_OPTIONS} ${_popt_}
|
2005-05-28 14:14:34 +02:00
|
|
|
. endif
|
bsd.options.mk provides boilerplate code for standard naming conventions
for handling per-package build options.
Before including this file, the following variables should be defined:
PKG_OPTIONS_VAR
This is a list of the name of the make(1) variables that
contain the options the user wishes to select. This
variable should be set in a package Makefile. E.g.,
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
or
PKG_OPTIONS_VAR= FOO_OPTIONS BAR_OPTIONS
PKG_SUPPORTED_OPTIONS
This is a list of build options supported by the package.
This variable should be set in a package Makefile. E.g.,
PKG_SUPPORTED_OPTIONS= kerberos ldap ssl
Optionally, the following variables may also be defined:
PKG_DEFAULT_OPTIONS
This is a list the options that should be built into
every package, if that option is supported. This
variable should be set in /etc/mk.conf.
${PKG_OPTIONS_VAR} (the variables named in PKG_OPTIONS_VAR)
These variables list the selected build options and
override any default options given in PKG_DEFAULT_OPTIONS.
If any of the options begin with a '-', then that option
is always removed from the selected build options, e.g.
PKG_DEFAULT_OPTIONS= kerberos ldap sasl
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= ${PKG_DEFAULT_OPTIONS} -sasl
# implies PKG_OPTIONS == "kerberos ldap"
or
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= kerberos -ldap ldap
# implies PKG_OPTIONS == "kerberos"
This variable should be set in /etc/mk.conf.
PKG_FAIL_UNSUPPORTED_OPTIONS
If this is set to "yes", then the presence of unsupported
options in PKG_OPTIONS.<pkg> (see below) causes the build
to fail. Set this to "no" to silently ignore unsupported
options. Default: "yes".
After including this file, the following variables are defined:
PKG_OPTIONS
This is the list of the selected build options, properly
filtered to remove unsupported and duplicate options.
Example usage:
-------------8<-------------8<-------------8<-------------8<-------------
# Global and legacy options
.if defined(USE_OPENLDAP) || defined(USE_SASL2)
. if !defined(PKG_OPTIONS.wibble)
. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
PKG_OPTIONS.wibble+= ldap
. endif
. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
PKG_OPTIONS.wibble+= sasl
. endif
. endif
.endif
PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
PKG_SUPPORTED_OPTIONS= ldap sasl
.include "../../mk/bsd.options.mk"
# Package-specific option-handling
###
### LDAP support
###
.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap/buildlink3.mk"
CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}
.endif
###
### SASL authentication
###
.if !empty(PKG_OPTIONS:Msasl)
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
.endif
-------------8<-------------8<-------------8<-------------8<-------------
2004-07-30 22:59:08 +02:00
|
|
|
. endif
|
|
|
|
.endfor
|
2005-05-25 13:18:35 +02:00
|
|
|
.undef _opt_
|
|
|
|
.undef _popt_
|
2005-05-28 14:14:34 +02:00
|
|
|
|
|
|
|
.if !empty(_OPTIONS_UNSUPPORTED)
|
|
|
|
PKG_FAIL_REASON:=The following selected options are not supported: ${_OPTIONS_UNSUPPORTED:O:u:Q}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.undef _OPTIONS_UNSUPPORTED
|
|
|
|
.undef _OPTIONS_DEFAULT_SUPPORTED
|
2005-05-16 11:08:29 +02:00
|
|
|
PKG_OPTIONS:= ${PKG_OPTIONS:O:u}
|
bsd.options.mk provides boilerplate code for standard naming conventions
for handling per-package build options.
Before including this file, the following variables should be defined:
PKG_OPTIONS_VAR
This is a list of the name of the make(1) variables that
contain the options the user wishes to select. This
variable should be set in a package Makefile. E.g.,
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
or
PKG_OPTIONS_VAR= FOO_OPTIONS BAR_OPTIONS
PKG_SUPPORTED_OPTIONS
This is a list of build options supported by the package.
This variable should be set in a package Makefile. E.g.,
PKG_SUPPORTED_OPTIONS= kerberos ldap ssl
Optionally, the following variables may also be defined:
PKG_DEFAULT_OPTIONS
This is a list the options that should be built into
every package, if that option is supported. This
variable should be set in /etc/mk.conf.
${PKG_OPTIONS_VAR} (the variables named in PKG_OPTIONS_VAR)
These variables list the selected build options and
override any default options given in PKG_DEFAULT_OPTIONS.
If any of the options begin with a '-', then that option
is always removed from the selected build options, e.g.
PKG_DEFAULT_OPTIONS= kerberos ldap sasl
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= ${PKG_DEFAULT_OPTIONS} -sasl
# implies PKG_OPTIONS == "kerberos ldap"
or
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= kerberos -ldap ldap
# implies PKG_OPTIONS == "kerberos"
This variable should be set in /etc/mk.conf.
PKG_FAIL_UNSUPPORTED_OPTIONS
If this is set to "yes", then the presence of unsupported
options in PKG_OPTIONS.<pkg> (see below) causes the build
to fail. Set this to "no" to silently ignore unsupported
options. Default: "yes".
After including this file, the following variables are defined:
PKG_OPTIONS
This is the list of the selected build options, properly
filtered to remove unsupported and duplicate options.
Example usage:
-------------8<-------------8<-------------8<-------------8<-------------
# Global and legacy options
.if defined(USE_OPENLDAP) || defined(USE_SASL2)
. if !defined(PKG_OPTIONS.wibble)
. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
PKG_OPTIONS.wibble+= ldap
. endif
. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
PKG_OPTIONS.wibble+= sasl
. endif
. endif
.endif
PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
PKG_SUPPORTED_OPTIONS= ldap sasl
.include "../../mk/bsd.options.mk"
# Package-specific option-handling
###
### LDAP support
###
.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap/buildlink3.mk"
CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}
.endif
###
### SASL authentication
###
.if !empty(PKG_OPTIONS:Msasl)
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
.endif
-------------8<-------------8<-------------8<-------------8<-------------
2004-07-30 22:59:08 +02:00
|
|
|
|
2004-11-27 05:50:55 +01:00
|
|
|
_PKG_OPTIONS_WORDWRAP_FILTER= \
|
2004-08-07 20:02:05 +02:00
|
|
|
${AWK} ' \
|
|
|
|
BEGIN { printwidth = 40; line = "" } \
|
|
|
|
{ \
|
|
|
|
if (length(line) > 0) \
|
|
|
|
line = line" "$$0; \
|
|
|
|
else \
|
|
|
|
line = $$0; \
|
|
|
|
if (length(line) > 40) { \
|
|
|
|
print " "line; \
|
|
|
|
line = ""; \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
END { if (length(line) > 0) print " "line } \
|
|
|
|
'
|
2004-11-27 05:50:55 +01:00
|
|
|
|
2005-05-08 15:43:30 +02:00
|
|
|
.PHONY: describe-options
|
|
|
|
describe-options:
|
|
|
|
@${ECHO} The following options are supported by this package:
|
|
|
|
.for _opt_ in ${PKG_SUPPORTED_OPTIONS:O}
|
|
|
|
@${ECHO} " "${_opt_:Q}" "`${SED} -n "s/^"${_opt_:Q}" //p" ../../mk/defaults/options.description`
|
|
|
|
.endfor
|
|
|
|
@${ECHO}
|
|
|
|
@${ECHO} "These options are enabled by default: "${PKG_SUGGESTED_OPTIONS:O:Q}
|
|
|
|
@${ECHO} "These options are currently enabled: "${PKG_OPTIONS:O:Q}
|
|
|
|
|
2004-12-05 10:20:48 +01:00
|
|
|
.PHONY: show-options
|
|
|
|
show-options:
|
2005-04-28 23:48:14 +02:00
|
|
|
@${ECHO} "available: "${PKG_SUPPORTED_OPTIONS:O:Q}
|
2005-05-08 15:43:30 +02:00
|
|
|
@${ECHO} "default: "${PKG_SUGGESTED_OPTIONS:O:Q}
|
2005-04-28 23:48:14 +02:00
|
|
|
@${ECHO} "enabled: "${PKG_OPTIONS:O:Q}
|
2004-12-05 10:20:48 +01:00
|
|
|
|
2005-01-24 19:04:24 +01:00
|
|
|
.if defined(PKG_SUPPORTED_OPTIONS)
|
|
|
|
.PHONY: supported-options-message
|
|
|
|
pre-extract: supported-options-message
|
|
|
|
supported-options-message:
|
2004-11-27 05:50:55 +01:00
|
|
|
. if !empty(PKG_SUPPORTED_OPTIONS)
|
|
|
|
@${ECHO} "=========================================================================="
|
|
|
|
@${ECHO} "The supported build options for this package are:"
|
|
|
|
@${ECHO} ""
|
2005-04-28 23:58:44 +02:00
|
|
|
@${ECHO} ${PKG_SUPPORTED_OPTIONS:O:Q} | ${XARGS} -n 1 | ${_PKG_OPTIONS_WORDWRAP_FILTER}
|
2004-11-28 09:00:51 +01:00
|
|
|
. if !empty(PKG_OPTIONS)
|
2004-11-27 05:50:55 +01:00
|
|
|
@${ECHO} ""
|
|
|
|
@${ECHO} "The currently selected options are:"
|
|
|
|
@${ECHO} ""
|
2005-04-28 23:58:44 +02:00
|
|
|
@${ECHO} ${PKG_OPTIONS:O:Q} | ${XARGS} -n 1 | ${_PKG_OPTIONS_WORDWRAP_FILTER}
|
2004-11-28 09:00:51 +01:00
|
|
|
. endif
|
2004-08-04 11:36:16 +02:00
|
|
|
@${ECHO} ""
|
2005-05-08 15:43:30 +02:00
|
|
|
@${ECHO} "You can select which build options to use by setting PKG_DEFAULT_OPTIONS"
|
|
|
|
@${ECHO} "or the following variable. Its current value is shown:"
|
2004-08-04 11:36:16 +02:00
|
|
|
@${ECHO} ""
|
2005-05-08 15:43:30 +02:00
|
|
|
. if !defined(${PKG_OPTIONS_VAR})
|
|
|
|
@${ECHO} " ${PKG_OPTIONS_VAR} (not defined)"
|
|
|
|
. else
|
|
|
|
@${ECHO} " ${PKG_OPTIONS_VAR} = ${${PKG_OPTIONS_VAR}}"
|
|
|
|
. endif
|
|
|
|
. if defined(_DEPRECATED_WARNING)
|
|
|
|
@${ECHO}
|
|
|
|
@for l in ${_DEPRECATED_WARNING}; \
|
|
|
|
do \
|
|
|
|
${ECHO} "$$l"; \
|
|
|
|
done
|
|
|
|
. endif
|
2004-08-04 11:36:16 +02:00
|
|
|
@${ECHO} ""
|
|
|
|
@${ECHO} "=========================================================================="
|
|
|
|
. endif
|
|
|
|
.endif
|
2005-05-14 04:17:43 +02:00
|
|
|
|
|
|
|
.endif # defined(PKG_OPTIONS_VAR) && defined(PKG_SUPPORTED_OPTIONS)
|