diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-08-25 07:09:15 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-08-25 10:46:44 +0200 |
commit | 113c43a42d20073428d46c04a1aa1cb305ea12d7 (patch) | |
tree | 8a2f7825f769dc6dcdfad2ae8b0aa564228e3031 /libbuild2/file.hxx | |
parent | 5035f4ef68922ac758b1e4734e67d73c9228010b (diff) |
Split import into search and load steps
This allows us to load things in a separate context.
Diffstat (limited to 'libbuild2/file.hxx')
-rw-r--r-- | libbuild2/file.hxx | 11 |
1 files changed, 11 insertions, 0 deletions
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<name, dir_path> + import_search (scope& base, name, const location&, bool subproj = true); + + LIBBUILD2_SYMEXPORT pair<names, const scope&> + import_load (context&, pair<name, dir_path>, const location&); + const target& import (context&, const prerequisite_key&); |