summaryrefslogtreecommitdiff
path: root/regress/pkg-options/files
diff options
context:
space:
mode:
authordillo <dillo@pkgsrc.org>2005-05-31 11:05:31 +0000
committerdillo <dillo@pkgsrc.org>2005-05-31 11:05:31 +0000
commit42816a484c346f31d606710fbd2df921fa0d3a76 (patch)
tree93fb1405b5ed4f1565c3a391342533d007a58bc8 /regress/pkg-options/files
parent671529f3f67028d8d34edc30e81be852974793ed (diff)
downloadpkgsrc-42816a484c346f31d606710fbd2df921fa0d3a76.tar.gz
To ease cleanup of the options namespace, add code to support legacy
option names: PKG_OPTIONS_LEGACY_OPTS+= old:new If PKG_DEFAULT_OPTIONS or PKG_OPTIONS.foo contains option old (or -old) it is rewritten to new (or -new) and a warning is issued by the supported-options-message target.
Diffstat (limited to 'regress/pkg-options/files')
-rw-r--r--regress/pkg-options/files/legacy-opt.mk17
-rw-r--r--regress/pkg-options/files/legacy-opt.out1
2 files changed, 18 insertions, 0 deletions
diff --git a/regress/pkg-options/files/legacy-opt.mk b/regress/pkg-options/files/legacy-opt.mk
new file mode 100644
index 00000000000..47c8c9218b7
--- /dev/null
+++ b/regress/pkg-options/files/legacy-opt.mk
@@ -0,0 +1,17 @@
+# $NetBSD: legacy-opt.mk,v 1.1 2005/05/31 11:05:31 dillo Exp $
+#
+# This file test a very simple options configuration.
+#
+
+MAKECONF= /dev/null
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.foo
+PKG_SUPPORTED_OPTIONS= new
+PKG_OPTIONS_LEGACY_OPTS+= old:new
+PKG_OPTIONS.foo= old
+
+.include "../../mk/bsd.options.mk"
+
+.PHONY: test
+test:
+ echo ${PKG_OPTIONS:M*:Q}
diff --git a/regress/pkg-options/files/legacy-opt.out b/regress/pkg-options/files/legacy-opt.out
new file mode 100644
index 00000000000..3e757656cf3
--- /dev/null
+++ b/regress/pkg-options/files/legacy-opt.out
@@ -0,0 +1 @@
+new