aboutsummaryrefslogtreecommitdiff
path: root/build2/b.cxx
diff options
context:
space:
mode:
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;