From 99dfd1924b8a7bb5bdd0df132416ff8de6c382fa Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 10 Nov 2017 20:41:51 +0200 Subject: Relax substitution requirements, add alternative symbol in version .in support Give this (legacy) version.h.in: Can now do: h{version}: in{version} file{$src_root/manifest} h{version}: in.symbol = '@' h{version}: FOO = $project.version --- build2/version/init.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'build2/version/init.cxx') diff --git a/build2/version/init.cxx b/build2/version/init.cxx index 7d08642..c0ce4cd 100644 --- a/build2/version/init.cxx +++ b/build2/version/init.cxx @@ -272,6 +272,16 @@ namespace build2 } } + // Enter variables. Note: some overridable, some not. + // + auto& vp (var_pool.rw (rs)); + + // Alternative variable substitution symbols. + // + // @@ Note: should be moved to the 'in' module once we have it. + // + m.in_symbol = &vp.insert ("in.symbol"); + // Register rules. // { -- cgit v1.1