From 4bab5c56cd1c91a928af73e0d428d8cc361600f4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 2 Jul 2020 07:51:07 +0200 Subject: Cache project name in root_extra --- libbuild2/scope.hxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libbuild2/scope.hxx') diff --git a/libbuild2/scope.hxx b/libbuild2/scope.hxx index 027fa46..bd1a70b 100644 --- a/libbuild2/scope.hxx +++ b/libbuild2/scope.hxx @@ -416,6 +416,14 @@ namespace build2 public: struct root_extra_type { + // This project's name (var_project value). Absent means it is not yet + // determined. NULL means simple project. Empty means unnamed project. + // + // Note that it is set to point to a temporary value before loading + // bootstrap.build and to a permanent one (from the variable) after. + // + optional project; + // This project's amalgamation (var_amalgamation value). Absent means it // is not yet determined. NULL means amalgamation is disabled. // @@ -562,6 +570,10 @@ namespace build2 // Return the project name or empty if unnamed. // + // Note that this function and named_project() below expect the root scope + // to either be already bootstrapped or being src-bootstrapped (see + // bootstrap_src()). + // const project_name& project (const scope& root); -- cgit v1.1