From 46a95c974de475070d0eedb07212e5c5282b66bd Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 5 Apr 2016 07:26:09 +0200 Subject: Implement --buildfile option, overrides default buildfile, supports '-' --- build2/b.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'build2/b.cxx') 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; -- cgit v1.1