aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/prerequisite.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-08-22 14:38:57 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-08-23 18:14:07 +0200
commit5035f4ef68922ac758b1e4734e67d73c9228010b (patch)
tree271fdd5b1d6e995a058d97aacb3ac90a538d9ff1 /libbuild2/prerequisite.cxx
parent8793941652d6aa1c3d02b2f87f691e6d06254b7d (diff)
Introduce notion of build context
All non-const global state is now in class context and we can now have multiple independent builds going on at the same time.
Diffstat (limited to 'libbuild2/prerequisite.cxx')
-rw-r--r--libbuild2/prerequisite.cxx27
1 files changed, 1 insertions, 26 deletions
diff --git a/libbuild2/prerequisite.cxx b/libbuild2/prerequisite.cxx
index 7355323..7b815d5 100644
--- a/libbuild2/prerequisite.cxx
+++ b/libbuild2/prerequisite.cxx
@@ -64,7 +64,7 @@ namespace build2
ext (to_ext (t.ext ())),
scope (t.base_scope ()),
target (&t),
- vars (false /* global */)
+ vars (t.ctx, false /* global */)
{
}
@@ -92,29 +92,4 @@ namespace build2
return r;
}
-
- // include()
- //
- include_type
- include_impl (action a,
- const target& t,
- const string& v,
- const prerequisite& p,
- const target* m)
- {
- include_type r (false);
-
- if (v == "false") r = include_type::excluded;
- else if (v == "adhoc") r = include_type::adhoc;
- else if (v == "true") r = include_type::normal;
- else
- fail << "invalid " << var_include->name << " variable value "
- << "'" << v << "' specified for prerequisite " << p;
-
- // Call the meta-operation override, if any (currently used by dist).
- //
- return current_mif->include == nullptr
- ? r
- : current_mif->include (a, t, prerequisite_member {p, m}, r);
- }
}