summaryrefslogtreecommitdiff
path: root/mk/bsd.options.mk
diff options
context:
space:
mode:
authordillo <dillo>2005-06-11 16:12:13 +0000
committerdillo <dillo>2005-06-11 16:12:13 +0000
commita855471341e8094fefa1f726b0237f67d89afd09 (patch)
tree57c483ee0636b349090c05df6355e8b810ef84f8 /mk/bsd.options.mk
parentcdcb59b669f69490aedc2670039ee93f8fb5de58 (diff)
downloadpkgsrc-a855471341e8094fefa1f726b0237f67d89afd09.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/bsd.options.mk')
-rw-r--r--mk/bsd.options.mk15
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
#