summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authordillo <dillo@pkgsrc.org>2005-07-26 09:00:42 +0000
committerdillo <dillo@pkgsrc.org>2005-07-26 09:00:42 +0000
commita6f3882d40a9ba8018a0bbf8580e50f3806dce20 (patch)
treecf1623a1c3195cf1068a45a82c00c5fc78acd4a6 /regress
parent1b312006162f9348d867ea18bc282608b000c462 (diff)
downloadpkgsrc-a6f3882d40a9ba8018a0bbf8580e50f3806dce20.tar.gz
Add support for sets of options where at least one option from each
set must be selected, requested and reviewed by wiz: PKG_OPTIONS_NONEMPTY_SETS This is a list of names of sets of options. At least one option from each set must be selected. The options in each set are listed in PKG_OPTIONS_SET.<setname>. Options from the sets will be automatically added to PKG_SUPPORTED_OPTIONS.
Diffstat (limited to 'regress')
-rw-r--r--regress/pkg-options/Makefile5
-rw-r--r--regress/pkg-options/files/sets.mk20
-rw-r--r--regress/pkg-options/files/sets.out1
3 files changed, 24 insertions, 2 deletions
diff --git a/regress/pkg-options/Makefile b/regress/pkg-options/Makefile
index f411d6d4ece..d18983d6986 100644
--- a/regress/pkg-options/Makefile
+++ b/regress/pkg-options/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2005/06/02 20:38:51 dillo Exp $
+# $NetBSD: Makefile,v 1.6 2005/07/26 09:00:42 dillo Exp $
#
DISTNAME= regress-pkg-options-1.0
@@ -8,7 +8,8 @@ DISTFILES= # empty
MAINTAINER= rillig@NetBSD.org
COMMENT= Test bsd.options.mk framework
-REGRESS_TESTS= all group-required groups legacy-opt order simple unsupported
+REGRESS_TESTS= all group-required groups legacy-opt order sets
+REGRESS_TESTS+= simple unsupported
do-test:
.for t in ${REGRESS_TESTS}
diff --git a/regress/pkg-options/files/sets.mk b/regress/pkg-options/files/sets.mk
new file mode 100644
index 00000000000..4d363889590
--- /dev/null
+++ b/regress/pkg-options/files/sets.mk
@@ -0,0 +1,20 @@
+# $NetBSD: sets.mk,v 1.1 2005/07/26 09:00:42 dillo Exp $
+#
+# This file tests non-empty option sets (PKG_OPTIONS_NONEMPTY_SETS).
+#
+
+MAKECONF= /dev/null
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.foo
+PKG_SUPPORTED_OPTIONS= single
+PKG_OPTIONS_NONEMPTY_SETS= abc def
+PKG_OPTIONS_SET.abc= a b c
+PKG_OPTIONS_SET.def= d e f
+
+PKG_OPTIONS.foo= a
+
+.include "../../mk/bsd.options.mk"
+
+.PHONY: test
+test:
+ echo ${PKG_FAIL_REASON:Q}
diff --git a/regress/pkg-options/files/sets.out b/regress/pkg-options/files/sets.out
new file mode 100644
index 00000000000..2c1fedd01ae
--- /dev/null
+++ b/regress/pkg-options/files/sets.out
@@ -0,0 +1 @@
+"At least one of the following options must be selected: "d\ e\ f