From 4f5b6cb7ed4e05e98cce7e692462f49e24b7a39a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 22 Aug 2019 14:38:57 +0200 Subject: Targets, scopes, vars --- libbuild2/install/init.cxx | 9 +++++---- libbuild2/install/rule.cxx | 4 ++-- libbuild2/install/utility.hxx | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'libbuild2/install') diff --git a/libbuild2/install/init.cxx b/libbuild2/install/init.cxx index 060007b..dac337f 100644 --- a/libbuild2/install/init.cxx +++ b/libbuild2/install/init.cxx @@ -62,7 +62,7 @@ namespace build2 vn += name; } vn += var; - const variable& vr (var_pool.rw (r).insert (move (vn), true)); + const variable& vr (r.ctx.var_pool.rw (r).insert (move (vn), true)); l = dv != nullptr ? config::required (r, vr, *dv, override).first @@ -79,7 +79,7 @@ namespace build2 vn = "install."; vn += name; vn += var; - const variable& vr (var_pool.rw (r).insert (move (vn))); + const variable& vr (r.ctx.var_pool.rw (r).insert (move (vn))); value& v (r.assign (vr)); @@ -122,7 +122,8 @@ namespace build2 // This one doesn't have config.* value (only set in a buildfile). // if (!global) - var_pool.rw (r).insert (string ("install.") + n + ".subdirs"); + r.ctx.var_pool.rw (r).insert ( + string ("install.") + n + ".subdirs"); } void @@ -192,7 +193,7 @@ namespace build2 // Enter module variables. // - auto& vp (var_pool.rw (rs)); + auto& vp (rs.ctx.var_pool.rw (rs)); // Note that the set_dir() calls below enter some more. // diff --git a/libbuild2/install/rule.cxx b/libbuild2/install/rule.cxx index 48a404b..478aadd 100644 --- a/libbuild2/install/rule.cxx +++ b/libbuild2/install/rule.cxx @@ -741,7 +741,7 @@ namespace build2 cstrings args; string reld ( - cast ((*global_scope)["build.host.class"]) == "windows" + cast (rs.ctx.global_scope["build.host.class"]) == "windows" ? msys_path (chd) : relative (chd).string ()); @@ -785,7 +785,7 @@ namespace build2 dir_path chd (chroot_path (rs, base.dir)); string reld ( - cast ((*global_scope)["build.host.class"]) == "windows" + cast (rs.ctx.global_scope["build.host.class"]) == "windows" ? msys_path (chd) : relative (chd).string ()); diff --git a/libbuild2/install/utility.hxx b/libbuild2/install/utility.hxx index 13fcceb..24c82d8 100644 --- a/libbuild2/install/utility.hxx +++ b/libbuild2/install/utility.hxx @@ -24,7 +24,7 @@ namespace build2 { auto r ( s.target_vars[tt]["*"].insert ( - var_pool.rw (s).insert ("install"))); + s.ctx.var_pool.rw (s).insert ("install"))); if (r.second) // Already set by the user? r.first.get () = path_cast (move (d)); @@ -42,7 +42,7 @@ namespace build2 { auto r ( s.target_vars[tt]["*"].insert ( - var_pool.rw (s).insert ("install.mode"))); + s.ctx.var_pool.rw (s).insert ("install.mode"))); if (r.second) // Already set by the user? r.first.get () = move (m); -- cgit v1.1