diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-04-05 07:26:09 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-04-05 07:26:09 +0200 |
commit | 46a95c974de475070d0eedb07212e5c5282b66bd (patch) | |
tree | 687d232cb775f0840c50a9c64bf96d3a16e6f4f3 /build2/b.cxx | |
parent | 5c369faa461ec4416d2d4b231a5b36963a7315ce (diff) |
Implement --buildfile option, overrides default buildfile, supports '-'
Diffstat (limited to 'build2/b.cxx')
-rw-r--r-- | build2/b.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/build2/b.cxx b/build2/b.cxx index f9c3683..313fe95 100644 --- a/build2/b.cxx +++ b/build2/b.cxx @@ -786,12 +786,13 @@ main (int argc, char* argv[]) trace << " src_root: " << src_root; } - path bf (src_base / path ("buildfile")); + const path& bfn (ops.buildfile ()); + path bf (bfn.string () != "-" ? src_base / bfn : bfn); // If we were guessing src_base, check that the buildfile // exists and if not, issue more detailed diagnostics. // - if (guessing && !file_exists (bf)) + if (guessing && bf.string () != "-" && !file_exists (bf)) fail << bf << " does not exist" << info << "consider explicitly specifying src_base " << "for " << tn; |