From 9479f74e4ca77e5bb5b00cb15c4ed408ecac370f Mon Sep 17 00:00:00 2001 From: dillo Date: Tue, 26 Jul 2005 09:00:42 +0000 Subject: 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.. Options from the sets will be automatically added to PKG_SUPPORTED_OPTIONS. --- regress/pkg-options/Makefile | 5 +++-- regress/pkg-options/files/sets.mk | 20 ++++++++++++++++++++ regress/pkg-options/files/sets.out | 1 + 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 regress/pkg-options/files/sets.mk create mode 100644 regress/pkg-options/files/sets.out (limited to 'regress') 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 -- cgit v1.2.3