aboutsummaryrefslogtreecommitdiff
path: root/build2/version/module.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-11-11 12:05:07 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-11-11 12:05:07 +0200
commitf2cd04ce05fedce4c5f850f40ee458adfd387c57 (patch)
treee838739c95bef011389dab8c059d2b26cae4afab /build2/version/module.hxx
parent99dfd1924b8a7bb5bdd0df132416ff8de6c382fa (diff)
Add in.substitution={strict|lax}
In the strict mode every substitution symbol is expected to start a substitution with the double symbol (e.g., $$) serving as an escape sequence. In the lax mode a pair of substitution symbols is only treated as a substitution if what's between them looks like a build2 variable name (i.e., doesn't contain spaces, etc). Everything else, including unterminated substitution symbols is copied as is. Note also that in this mode the double symbol is not treated as an escape sequence. The lax mode is mostly useful when trying to reuse existing .in files, for example from autoconf. Note, however, that the lax mode is still stricter than the autoconf's semantics which also leaves unknown substitutions as is.
Diffstat (limited to 'build2/version/module.hxx')
-rw-r--r--build2/version/module.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/build2/version/module.hxx b/build2/version/module.hxx
index 4f9f66d..190d8d7 100644
--- a/build2/version/module.hxx
+++ b/build2/version/module.hxx
@@ -27,7 +27,8 @@ namespace build2
butl::standard_version version;
dependency_constraints dependencies;
- const variable* in_symbol = nullptr;
+ const variable* in_symbol = nullptr; // in.symbol
+ const variable* in_substitution = nullptr; // in.substitution
module (butl::standard_version v, dependency_constraints d)
: version (move (v)), dependencies (move (d)) {}