diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-09-02 07:08:17 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-09-02 07:08:17 +0200 |
commit | ce69ad7c2aaf517ec3f789300bf1ae29d8f0dc5d (patch) | |
tree | b406ee722e83bbbb3d4e7a7509d03ca5e0dc7b2e /libbuild2 | |
parent | 8f34de5c103e9e4d2c27583020f2975907b626ad (diff) |
Rename in.substitution variable to in.mode
The original name is still recognized for backwards compatibility.
Diffstat (limited to 'libbuild2')
-rw-r--r-- | libbuild2/in/init.cxx | 6 | ||||
-rw-r--r-- | libbuild2/in/rule.cxx | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libbuild2/in/init.cxx b/libbuild2/in/init.cxx index 18071f8..6743e31 100644 --- a/libbuild2/in/init.cxx +++ b/libbuild2/in/init.cxx @@ -58,7 +58,11 @@ namespace build2 // is still stricter than the autoconf's semantics which also leaves // unknown substitutions as is. // - vp.insert<string> ("in.substitution"); + const variable& im (vp.insert<string> ("in.mode")); + + // Original name of this variable for backwards compatibility. + // + vp.insert_alias (im, "in.substitution"); // Fallback value to use for NULL value substitutions. If unspecified, // NULL substitutions are an error. diff --git a/libbuild2/in/rule.cxx b/libbuild2/in/rule.cxx index 5a6db30..3aa92a2 100644 --- a/libbuild2/in/rule.cxx +++ b/libbuild2/in/rule.cxx @@ -108,7 +108,7 @@ namespace build2 // Substitution mode. // bool strict (strict_); - if (const string* s = cast_null<string> (t["in.substitution"])) + if (const string* s = cast_null<string> (t["in.mode"])) { if (*s == "lax") strict = false; |