From ce69ad7c2aaf517ec3f789300bf1ae29d8f0dc5d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 2 Sep 2022 07:08:17 +0200 Subject: Rename in.substitution variable to in.mode The original name is still recognized for backwards compatibility. --- libbuild2/in/init.cxx | 6 +++++- libbuild2/in/rule.cxx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'libbuild2') 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 ("in.substitution"); + const variable& im (vp.insert ("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 (t["in.substitution"])) + if (const string* s = cast_null (t["in.mode"])) { if (*s == "lax") strict = false; -- cgit v1.1