aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/b.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/build2/b.cxx b/build2/b.cxx
index 4a764e6..8d06a72 100644
--- a/build2/b.cxx
+++ b/build2/b.cxx
@@ -587,8 +587,21 @@ main (int argc, char* argv[])
// out. If src_base is still undetermined, calculate it.
//
if (src_base.empty ())
+ {
src_base = src_root / out_base.leaf (out_root);
+ if (!exists (src_base))
+ {
+ diag_record dr;
+ dr << fail << "src_base directory " << src_base
+ << " does not exist";
+
+ if (guessing)
+ dr << info << "consider explicitly specifying src_base "
+ << "for " << tn;
+ }
+ }
+
// Check that out_root that we have found is the innermost root
// for this project. If it is not, then it means we are trying
// to load a disfigured sub-project and that we do not support.