aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/parser.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/parser.hxx')
-rw-r--r--libbuild2/parser.hxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/libbuild2/parser.hxx b/libbuild2/parser.hxx
index 61ecd5b..5f762f7 100644
--- a/libbuild2/parser.hxx
+++ b/libbuild2/parser.hxx
@@ -91,12 +91,6 @@ namespace build2
parse_export_stub (istream& is, const path_name& name,
scope& rs, scope& bs)
{
- auto g = make_guard ([this, old = imported_] () mutable
- {
- imported_ = old;
- });
- imported_ = true;
-
parse_buildfile (is, name, &rs, bs);
return move (export_value);
}
@@ -912,8 +906,12 @@ namespace build2
small_vector<attributes, 2> attributes_;
- bool imported_ = false; // True if loaded via export stub.
- optional<location> condition_; // Innermost if/switch (but not in recipe).
+ // Innermost if/switch (but excluding recipes).
+ //
+ // Note also that this is cleared/restored when crossing the include
+ // (but not source) boundary.
+ //
+ optional<location> condition_;
target* default_target_ = nullptr;