diff options
author | dillo <dillo@pkgsrc.org> | 2005-06-11 16:12:13 +0000 |
---|---|---|
committer | dillo <dillo@pkgsrc.org> | 2005-06-11 16:12:13 +0000 |
commit | 91ba937bb492c3125b7fa74c91fc80c8a9b7e26a (patch) | |
tree | 57c483ee0636b349090c05df6355e8b810ef84f8 /mk | |
parent | 1e0f391428185ee3491e990fe8524115ac7f0d8b (diff) | |
download | pkgsrc-91ba937bb492c3125b7fa74c91fc80c8a9b7e26a.tar.gz |
Allow this file to be included even if no options are supported
(as may be the case if all options are platform specific). In that
case set PKG_OPTIONS to empty and skip the rest of the file.
Okayed by jlam.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.options.mk | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/mk/bsd.options.mk b/mk/bsd.options.mk index 73a90d1b4b2..5709118ad18 100644 --- a/mk/bsd.options.mk +++ b/mk/bsd.options.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.options.mk,v 1.41 2005/06/09 18:44:26 jlam Exp $ +# $NetBSD: bsd.options.mk,v 1.42 2005/06/11 16:12:13 dillo Exp $ # # This Makefile fragment provides boilerplate code for standard naming # conventions for handling per-package build options. @@ -52,8 +52,10 @@ # A list of warnings about deprecated variables or # options used, and what to use instead. # -# At least one of PKG_SUPPORTED_OPTIONS, PKG_OPTIONS_OPTIONAL_GROUPS, -# and PKG_OPTIONS_REQUIRED_GROUPS must be defined. +# If none of PKG_SUPPORTED_OPTIONS, PKG_OPTIONS_OPTIONAL_GROUPS, +# and PKG_OPTIONS_REQUIRED_GROUPS are defined, PKG_OPTIONS is +# set to the empty list and the package is otherwise treated as +# not using the options framework. # # # Optionally, the user may define the following variables in /etc/mk.conf: @@ -141,10 +143,11 @@ PKG_OPTIONS= # empty # Check for variable definitions required before including this file. -.if !defined(PKG_SUPPORTED_OPTIONS) && !defined(PKG_OPTIONS_OPTIONAL_GROUPS) && !defined(PKG_OPTIONS_REQUIRED_GROUPS) -PKG_FAIL_REASON+= "bsd.options.mk: At least one of PKG_SUPPORTED_OPTIONS, PKG_OPTIONS_OPTIONAL_GROUPS, and PKG_OPTIONS_REQUIRED_GROUPS must be defined." -.elif !defined(PKG_OPTIONS_VAR) +.if !defined(PKG_OPTIONS_VAR) PKG_FAIL_REASON+= "bsd.options.mk: PKG_OPTIONS_VAR is not defined." +.elif !defined(PKG_SUPPORTED_OPTIONS) && !defined(PKG_OPTIONS_OPTIONAL_GROUPS) && !defined(PKG_OPTIONS_REQUIRED_GROUPS) +# no supported options: set PKG_OPTIONS to empty and skip rest of file +PKG_OPTIONS= #empty .else # process the rest of the file # |