From 113c43a42d20073428d46c04a1aa1cb305ea12d7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 25 Aug 2019 07:09:15 +0200 Subject: Split import into search and load steps This allows us to load things in a separate context. --- libbuild2/file.hxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libbuild2/file.hxx') diff --git a/libbuild2/file.hxx b/libbuild2/file.hxx index aaa0fa0..009ba14 100644 --- a/libbuild2/file.hxx +++ b/libbuild2/file.hxx @@ -215,9 +215,20 @@ namespace build2 // foo and I see there is a package foo available in repository bar. Wanna, // like, download and use it or something?" // + // Note also that we return names rather than a single name: while normally + // it will be a single target name, it can be an out-qualified pair (if + // someone wants to return a source target) but it can also be a non-target + // since we don't restrict what users can import/export. + // LIBBUILD2_SYMEXPORT names import (scope& base, name, const location&); + LIBBUILD2_SYMEXPORT pair + import_search (scope& base, name, const location&, bool subproj = true); + + LIBBUILD2_SYMEXPORT pair + import_load (context&, pair, const location&); + const target& import (context&, const prerequisite_key&); -- cgit v1.1