aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/file.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-05-15 12:11:30 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-05-27 08:28:34 +0200
commit02d902cb8e5e69b123fcdf170e5eeb9ca5605304 (patch)
tree29ed61127744a3fc1554bee96230342cae8f5972 /libbuild2/file.hxx
parentba1fb800d20e7757cd8523a0793f63cff137c7cf (diff)
Amalgamation cutoff support
Now a project that disables amalgamation will not logically "see" an outer project even if it's physically inside its scope.
Diffstat (limited to 'libbuild2/file.hxx')
-rw-r--r--libbuild2/file.hxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/libbuild2/file.hxx b/libbuild2/file.hxx
index 8af408e..0123591 100644
--- a/libbuild2/file.hxx
+++ b/libbuild2/file.hxx
@@ -213,24 +213,27 @@ namespace build2
load_root (scope& root);
// Extract the specified variable value from a buildfile. It is expected to
- // be the first non-comment line and not to rely on any variable expansion
- // other than those from the global scope or any variable overrides. Return
- // an indication of whether the variable was found.
+ // be the n'th non-blank/comment line and not to rely on any variable
+ // expansions other than those from the global scope or any variable
+ // overrides. Return in second an indication of whether the variable was
+ // found.
//
LIBBUILD2_SYMEXPORT pair<value, bool>
- extract_variable (context&, const path&, const variable&);
+ extract_variable (context&, const path&, const variable&, size_t n = 1);
- // As above, but extract from a stream. The name argument is used for
+ // As above, but extract from a stream. The path argument is used for
// diagnostics.
//
LIBBUILD2_SYMEXPORT pair<value, bool>
- extract_variable (context&, istream&, const path& name, const variable&);
+ extract_variable (context&,
+ istream&, const path&,
+ const variable&, size_t = 1);
// As above, but extract from a lexer (this could be useful for extracting
// from stdin).
//
LIBBUILD2_SYMEXPORT pair<value, bool>
- extract_variable (context&, lexer&, const variable&);
+ extract_variable (context&, lexer&, const variable&, size_t = 1);
// Import has two phases: the first is triggered by the import directive in
// the buildfile. It will try to find and load the project. Failed that, it