From 294a883863fa7713edc5278adddf8f60a28c8a9f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 24 Feb 2022 10:03:43 +0200 Subject: WIP --- libbuild2/context.cxx | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'libbuild2/context.cxx') diff --git a/libbuild2/context.cxx b/libbuild2/context.cxx index d78efba..d0b24e0 100644 --- a/libbuild2/context.cxx +++ b/libbuild2/context.cxx @@ -586,9 +586,10 @@ namespace build2 var_export_metadata = &vp.insert ("export.metadata", v_t); // Untyped. var_extension = &vp.insert ("extension", v_t); - var_clean = &vp.insert ("clean", v_t); - var_backlink = &vp.insert ("backlink", v_t); - var_include = &vp.insert ("include", v_q); + var_update = &vp.insert ("update", v_q); + var_clean = &vp.insert ("clean", v_t); + var_backlink = &vp.insert ("backlink", v_t); + var_include = &vp.insert ("include", v_q); // Backlink executables and (generated) documentation by default. // @@ -696,13 +697,28 @@ namespace build2 const operation_info* outer_oif, bool diag_noise) { - current_oname = (outer_oif == nullptr ? inner_oif : *outer_oif).name; + const auto& oif (outer_oif == nullptr ? inner_oif : *outer_oif); + + current_oname = oif.name; current_inner_oif = &inner_oif; current_outer_oif = outer_oif; current_on++; current_mode = inner_oif.mode; current_diag_noise = diag_noise; + if (oif.var_name != nullptr) + { + current_ovar = var_pool.find (oif.var_name); + + // The operation variable should have prerequisite or target visibility. + // + assert (current_ovar != nullptr && + (current_ovar->visibility == variable_visibility::prereq || + current_ovar->visibility == variable_visibility::target)); + } + else + current_ovar = nullptr; + // Reset counters (serial execution). // dependency_count.store (0, memory_order_relaxed); -- cgit v1.1