aboutsummaryrefslogtreecommitdiff
path: root/build2/b.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-04-05 07:26:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-04-05 07:26:09 +0200
commit46a95c974de475070d0eedb07212e5c5282b66bd (patch)
tree687d232cb775f0840c50a9c64bf96d3a16e6f4f3 /build2/b.cxx
parent5c369faa461ec4416d2d4b231a5b36963a7315ce (diff)
Implement --buildfile option, overrides default buildfile, supports '-'
Diffstat (limited to 'build2/b.cxx')
-rw-r--r--build2/b.cxx5
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;